wayne461 wrote:
> If I could bother you some more...Part of the code is stil beyond my ability
> though. Did you envision the "cross" as the part of the code allowing me to
> walk the spline and make a red cylinder between theparallel set of points on
> either side of a seam to make red stiches along the seam?
>
Yes but it is also how I made the parallel bunching along the seam. The
vcross gives the cross product. The cross product of two vectors gives
a vector that is perpendicular to the plane of the two vectors you take
the cross product of.
So here's how it works:
In my illustration you can see that the actual spline rides above the
surface of the sphere. (Jellby's contribution my eliminate the need for
this but...later* )
The orange ball is some point on the spline as we loop along it:
SeamSpline(I/Grain)
The green cylinder is a segment of the spline which I called Seg
SeamSpline(I/Grain)-SeamSpline((I-1)/Grain)
The blue cylinder runs perpendicular to the ball's surface from
the orange ball which I call Norm
The cyan plane is the plane that the two vectors Norm and Seg lie in
The red cylinder is the cross product of the Norm and Seg vectors and
is therefore perpendicular to the cyan plane.
I use it to locate a point along-side the spline, the red sphere
Now you see in the code that I use the trace() function.
This function finds the point where the magenta cylinder intersects
the ball's surface, marked by the magenta sphere. The magenta cylinder
is nothing more that the path from the red sphere to the center of the
ball. The magenta sphere is the same as the spherical blob components
that I use to make the lumps along the seam.
* But now with Jelby's contribution it is probably possible to define
points directly on the surface of a sphere, thus obviating much of this.
Post a reply to this message
Attachments:
Download 'img.0000.jpg' (25 KB)
Preview of image 'img.0000.jpg'
|