POV-Ray : Newsgroups : povray.advanced-users : i still do not have an answer yet : Re: i still do not have an answer yet Server Time
29 Jul 2024 20:15:09 EDT (-0400)
  Re: i still do not have an answer yet  
From: Francois Labreque
Date: 14 Jan 2001 09:22:17
Message: <3A61B595.9D258E29@videotron.ca>
Adam Gibbons wrote:
> 
> plus it would be usesfull to know in the future for other sceans with maybe
> a simaler problem.
> 
> if you know the answer then please just tell me.

David Fontaine already did:

	This is basically vectors and matrices.

	The matrices for the different transforms and a basic explana-
	tion of how they work is here, but it won't tell you the basics
	of matrix math like multiplying, etc: 
	http://davidf.faricy.net/povre.html#Matrices (nothing like a
	little website promotion)

As did Tor Olav Kristensen:

	// Rotate around the x-axis
	#declare pRot1 = <pStart.x,
            cos(xAngle)*pStart.y - sin(xAngle)*pStart.z,
            cos(xAngle)*pStart.z + sin(xAngle)*pStart.y>;
   
	// Rotate around the y-axis
	#declare pRot2 = <cos(yAngle)*pRot1.x  + sin(yAngle)*pRot1.z,
            pRot1.y,
            cos(yAngle)*pRot1.z  - sin(yAngle)*pRot1.x>

	// Rotate around the z-axis
	#declare pRot3 = <cos(zAngle)*pRot2.x  - sin(zAngle)*pRot2.y,
            cos(zAngle)*pRot2.y  + sin(zAngle)*pRot2.x,
            pRot2.z>

And I remember someone else providing these equations to Rune as well in
an other thread.




> 
> Adam
> 
> "Warp" <war### [at] tagpovrayorg> wrote in message
> news:3a619eda@news.povray.org...
> >   I just don't understand why you want to make this. What will you achieve
> > doing it?
> >   Your rendering speed will not be affected in any way.
> >   You will only cause yourself more trouble than it's worth.
> >
> >   If you keep the transformations that put the object in the right place,
> > it's easier to see how the location was calculated.
> >   Also, what happens if you want to slightly modify one of the
> transformations?
> > Instead of just modifying one number in the transformations you'll have to
> > recalculate the whole thing again. Why, when povray can do it for
> yourself?
> >
> >   Of course it's good to know the math to get the location of a point
> which
> > have been transformed because it can have some uses, but in my experience
> > one of these uses is not putting the result directly in the object
> > definition.
> >
> > --
> > char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
> > main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
> > c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););}    /*- Warp -*/

-- 
Francois Labreque | Unfortunately, there's no such thing as a snooze
    flabreque     | button on a cat who wants breakfast.
        @         |      - Unattributed quote from rec.humor.funny
   videotron.ca


Post a reply to this message

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