|
![](/i/fill.gif) |
John M. Dlugosz <joh### [at] dlugosz com> wrote:
> I think the green "imperfections" are just fine, mimicing the seam on real
> weaving. The red marks just look funny.
>
> adding semi-random variations... how can we manage that with your macro?
> Iterate the basic shape and peterb a tad? Use blobs so everything flows
> together nicely instead of torii which have to match the spec?
The Spline Macro File offers the framework in which to create your own,
completely custom spline-based object creation routines, without having to
worry about looping through and evaluating the spline itself (if you don't
want to). This can include perturbing the shape of the spline and using
blobs, or using the torus_arc () sub macro with semi-random parameters. Or,
you could algorithmically define a spline that followed the exact shape of
the weaving, e.g.:
#declare SplinePoints = array[NumberOfStruts*2]
#declare C = 0; #while (C < NumberOfStruts)
#declare SplinePoints[C] = [alternating sides of adjacent struts];
#declare C = C + 1;
#declare SplinePoints[C] = [direction of weave];
#declare C = C + 1; #end
#declare WeaveSpline = create_spline (SplinePoints,
create_hermite_spline)
Using the hermite spline option means we can set a list of points and spline
directions/tangents. In the loop that defines the points and tangents you
can add variations to either as you like.
Post a reply to this message
|
![](/i/fill.gif) |