|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Is it possible to apply a transformation to a single vector? (for instance
if my vector is <1,0,0> and my transformation is transformation is
transform{translate <2,0,0> rotate 90*z}, I want to get <0,3,0>)
--
Daniel Pirch
dpi### [at] gmxnet
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Daniel Pirch wrote:
> Is it possible to apply a transformation to a single vector? (for instance
> if my vector is <1,0,0> and my transformation is transformation is
> transform{translate <2,0,0> rotate 90*z}, I want to get <0,3,0>)
Yes.
--
"My new computer's got the clocks, it rocks
But it was obsolete before I opened the box" - W.A.Y.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Jon A. Cruz" wrote:
> Daniel Pirch wrote:
>
> > Is it possible to apply a transformation to a single vector? (for instance
> > if my vector is <1,0,0> and my transformation is transformation is
> > transform{translate <2,0,0> rotate 90*z}, I want to get <0,3,0>)
>
> Yes.
Now, to start guessing what you need, instead of just what you asked. :-)
RT_M ( http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?query=RTM )
Check the docs (be sure to check the language help, not the Windows help) for
vector functions.
--
"My new computer's got the clocks, it rocks
But it was obsolete before I opened the box" - W.A.Y.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> > > Is it possible to apply a transformation to a single vector? (for
instance
> > > if my vector is <1,0,0> and my transformation is transformation is
> > > transform{translate <2,0,0> rotate 90*z}, I want to get <0,3,0>)
>
> Check the docs (be sure to check the language help, not the Windows help)
for
> vector functions.
Of course I've checked the docs before I posted my Question. I would never
ask before doing that :-)
But as vector functions, there are only vaxis_rotate, vcross, vnormalize and
vrotate. I asked if it's possible (and HOW) to transform a vector by an
already declared transformation. I can do this with an object:
#declare MyTrans = transform{translate ... rotate ... scale ... ...}
sphere{0,1 transform MyTrans}
But how can I do this with vector coordinates?
Thanks
Daniel Pirch
dpi### [at] gmxnet
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Daniel Pirch <dpi### [at] gmxnet> wrote:
: I asked if it's possible (and HOW) to transform a vector by an
: already declared transformation.
It's not possible.
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Check out http://users.erols.com/vansickl/macs.htm on that page there is a
vmatrix macro that applies matrix tranformations to vectors, which will
accomplish what you want to do. His explanaion of how the Matrix command works
will help out, too.
Daniel Pirch wrote:
> > > > Is it possible to apply a transformation to a single vector? (for
> instance
> > > > if my vector is <1,0,0> and my transformation is transformation is
> > > > transform{translate <2,0,0> rotate 90*z}, I want to get <0,3,0>)
> >
> > Check the docs (be sure to check the language help, not the Windows help)
> for
> > vector functions.
>
> Of course I've checked the docs before I posted my Question. I would never
> ask before doing that :-)
>
> But as vector functions, there are only vaxis_rotate, vcross, vnormalize and
> vrotate. I asked if it's possible (and HOW) to transform a vector by an
> already declared transformation. I can do this with an object:
>
> #declare MyTrans = transform{translate ... rotate ... scale ... ...}
>
> sphere{0,1 transform MyTrans}
>
> But how can I do this with vector coordinates?
>
> Thanks
> Daniel Pirch
>
> dpi### [at] gmxnet
--
Josh English
eng### [at] spiritonecom
icq 1946299
"Stress is when you wake up screaming and realize you haven't fallen asleep
yet."
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
It is not possible directly. You can facilitate the process by predeclarin
transformation vectors. Keep in mind the following:
object vector
------ ------
scale <x,y,z> vector * <x,y,z>
rotate <x,y,z> vrotate(vector, <x,y,z>)
translate <x,y,z> vector + <x,y,z>
Now declare, for example, a rotation vector, and use it both after the 'rotate'
keyword and in the 'vrotate' function.
Margus
Daniel Pirch wrote:
>
>
> Of course I've checked the docs before I posted my Question. I would never
> ask before doing that :-)
>
> But as vector functions, there are only vaxis_rotate, vcross, vnormalize and
> vrotate. I asked if it's possible (and HOW) to transform a vector by an
> already declared transformation. I can do this with an object:
>
> #declare MyTrans = transform{translate ... rotate ... scale ... ...}
>
> sphere{0,1 transform MyTrans}
>
> But how can I do this with vector coordinates?
>
> Thanks
> Daniel Pirch
>
> dpi### [at] gmxnet
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
This is why I made a patch which added a vtransform() function. :-)
vtransform(TRANSFORM, VECTOR)
Returns a vector which is the result of applying transformation
TRANSFORM to the vector VECTOR.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Forgot to add this:
I will be posting the source for this in povray.programming sometime
soon, and I have sent it to Ron Parker. The disadvantage is that you
will either have to use an unofficial version, or wait until it gets
into the official POV-Ray(if it ever does...maybe POV-Ray 3.5?).
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Chris Huff wrote:
>
> Forgot to add this:
> I will be posting the source for this in povray.programming sometime
> soon, and I have sent it to Ron Parker. The disadvantage is that you
> will either have to use an unofficial version, or wait until it gets
> into the official POV-Ray(if it ever does...maybe POV-Ray 3.5?).
It almost seems to be a race now if there will be an updated version
of the SuperPatch before the official Pov v3.5 will become available.
Any comments Ron ?
--
Ken Tyler - 1100+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|