![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
does vrotate work under povray 3.1g for windows ??!!
"Warp" <war### [at] tag povray org> 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <3a63a73f@news.povray.org>, "Adam Gibbons"
<Fie### [at] email com> wrote:
> does vrotate work under povray 3.1g for windows ??!!
Yes, the vrotate() function is part of the official version. However,
the vtransform() function isn't, it is a patch that I wrote, but it is
in MegaPOV and will eventually be in POV 3.5. You could imitate it
partially with macros, like:
#macro VTranslate(V, Translation) (V+Translation) #end
#macro VScale(V, Translation) (V*Translation) #end
Another function in the official version that you may find useful is
vaxis_rotate(), which rotates a point around a given axis by a specified
number of degrees instead of x, y, then z.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Chris Huff <chr### [at] mac com> wrote:
: #macro VScale(V, Translation) (V*Translation) #end
Your choice of parameter name is not the best possible ;)
: Another function in the official version that you may find useful is
: vaxis_rotate(), which rotates a point around a given axis by a specified
: number of degrees instead of x, y, then z.
A macro that applies an axis_rotate to an object is not too difficult to
do either (I think someone has already done it; and it can be found in
the matrix page iirc).
--
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <3a647ada@news.povray.org>, Warp <war### [at] tag povray org>
wrote:
> : #macro VScale(V, Translation) (V*Translation) #end
>
> Your choice of parameter name is not the best possible ;)
That's what I get for copy-pasting too much... :-)
> A macro that applies an axis_rotate to an object is not too difficult
> to do either (I think someone has already done it; and it can be
> found in the matrix page iirc).
There is one on the Thoroughly Useful Macros page, it's called
AxisRotate().
http://enphilistor.users4.50megs.com/macs.htm
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |