Finally made 'branching' example basically work.

This commit is contained in:
Chris Hodapp 2019-12-01 01:40:39 +01:00
parent 6ac45773f7
commit ff63e15d10
2 changed files with 6 additions and 15 deletions

View File

@ -1,22 +1,13 @@
# To-do items, wanted features, bugs: # To-do items, wanted features, bugs:
## Cool ## Cool
- Examples of branching. This will probably need recursion via functions
(or an explicit stack some other way). If I simply
split a boundary into sub-boundaries per the rules I already
have in my notes, then this still lets me split any way I want
to without having to worry about joining N boundaries instead
of 2, doesn't it?
- Note that for this to work right, either gen2mesh has to be
called separately on every straight portion, or I have to
make a version of gen2mesh that can handle something more
like trees of boundaries, not just flat lists.
- More complicated: Examples of *merging*. I'm not sure on the theory - More complicated: Examples of *merging*. I'm not sure on the theory
behind this. behind this.
## Annoying/boring ## Annoying/boring
- https://en.wikipedia.org/wiki/Polygon_triangulation - do this to - https://en.wikipedia.org/wiki/Polygon_triangulation - do this to
fix my wave example! fix my wave example!
- http://www.polygontriangulation.com/2018/07/triangulation-algorithm.html
- I really need to standardize some of the behavior of fundamental - I really need to standardize some of the behavior of fundamental
operations (with regard to things like sizes they generate). This operations (with regard to things like sizes they generate). This
is behavior that, if it changes, will change a lot of things that I'm is behavior that, if it changes, will change a lot of things that I'm

View File

@ -155,14 +155,14 @@ def ram_horn_branch():
# yes, I can do this in a one-liner # yes, I can do this in a one-liner
# yes, it should be normalized, but I reused from something else # yes, it should be normalized, but I reused from something else
if i == 0: if i == 0:
dx, dy = 0.25, 0.25 dx, dy = 1, 1
elif i == 1: elif i == 1:
dx, dy = -0.25, 0.25 dx, dy = -1, 1
elif i == 2: elif i == 2:
dx, dy = -0.25, -0.25 dx, dy = -1, -1
elif i == 3: elif i == 3:
dx, dy = 0.25, -0.25 dx, dy = 1, -1
return meshutil.Transform().rotate([-dy,dx,0], -numpy.pi/4) return meshutil.Transform().rotate([-dy,dx,0], -numpy.pi/6)
# this has to begin with cage_sub, prior to xf_sub(i) being # this has to begin with cage_sub, prior to xf_sub(i) being
# composed in, because only this lines up with where the last # composed in, because only this lines up with where the last
# frame finished # frame finished