|
|
"Bill Pragnell" <bil### [at] hotmailcom> wrote:
> Are you trying to keep the box 'upright' - rotating it around y before tilting
> it out of plane, like a ramp?
Sure - that works for me.
If so, you could use Reorient_Trans() twice on
> them to keep it simple... it's in transforms.inc (which I see you're using
> already).
("point", "axis", "vector" ... sure. They're all the same thing.)
Here's what I tried - still no joy.
1. define a transform which is a y - rotation, the magnitude of which was
determined by projecting Point 2 onto the x-z plane [see prior code]
2. rotate my "x-axis vector" around y by this transform
3. define a transform that rotates x to the new y-rotated position
4. define a transform that rotates YRotated vector up to Point2, which as we
know, is a point, a vector, and an axis
5. apply both transforms to the object
#declare YTransform = transform { rotate y*YDeg };
#declare YRotated = vtransform (<StrutLength, 0, 0>, YTransform);
#declare NewTransform1 = transform { Reorient_Trans(x, YRotated) };
#declare NewTransform2 = transform { Reorient_Trans(YRotated, Point2) };
#declare NewIBeam = object {IBeam transform NewTransform1 transform
NewTransform2};
Post a reply to this message
|
|