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
30 Jul 2024 02:20:42 EDT (-0400)
  Re: i still do not have an answer yet  
From: Adam Gibbons
Date: 15 Jan 2001 20:43:27
Message: <3a63a73f@news.povray.org>
does vrotate work under povray 3.1g for windows ??!!

"Warp" <war### [at] tagpovrayorg> wrote in message
news:3a62ba2f@news.povray.org...
>   So what you want is just a vector telling you the location of the
object.
> You don't need to calculate the result by yourself but you can let povray
> do it, as others have already answered.
>   If you are using megapov, you can declare all the transformations in one
> identifier and then apply the same transformation to the object and to
> a vector (with vtransform), as already pointed out.
>   It's also good to know how to make the individual transformations to a
> vector:
>
> translate <a,b,c>  <=>  #declare Vector = Vector + <a,b,c>;
>     scale <a,b,c>  <=>  #declare Vector = Vector * <a,b,c>;
>    rotate <a,b,c>  <=>  #declare Vector = vrotate(Vector, <a,b,c>);
>
>   If you want to make the individual transformations to the vector (eg.
because
> you don't have megapov to use vtransform, or for other reason), just apply
> the abovementioned equivalent operations.
>   For example:
>
> sphere
> { 0, 1  #declare Loc = <0,0,0>;
>   translate <1,2,-3>  #declare Loc = Loc + <1,2,-3>;
>   rotate y*30  #declare Loc = vrotate(Loc, y*30);
>   translate -x*2  #declare Loc = Loc - x*2;
>   scale .5  #declare Loc = Loc * .5;
> }
>
>   Now 'Loc' will be the coordinate of the center of the sphere.
>
> --
> 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 -*/


Post a reply to this message

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