POV-Ray : Newsgroups : povray.newusers : Help - very difficult when it should be easy : Re: Help - very difficult when it should be easy Server Time
23 Apr 2024 23:14:52 EDT (-0400)
  Re: Help - very difficult when it should be easy  
From: Bald Eagle
Date: 16 Nov 2016 12:35:00
Message: <web.582c9795ba97f5c1b488d9aa0@news.povray.org>
"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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.