![](/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) |
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] gmx net
--
Josh English
eng### [at] spiritone com
icq 1946299
"Stress is when you wake up screaming and realize you haven't fallen asleep
yet."
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) |
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] gmx net
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) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/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 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
This is inconsistent with the other vector functions:
vrotate(VECTOR, ROTATION)
vaxis_rotate(VECTOR, AXIS, ANGLE)
but:
: vtransform(TRANSFORM, VECTOR)
--
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
True, and I have been intending to change the order. To do that would be
very easy, and would only involve rearranging the code a little, I just
haven't done it yet.
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) |
On Wed, 20 Oct 1999 18:06:14 -0700, Ken wrote:
>
>
>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 ?
Sorry, went to Minneapolis for a few days there so this is the first I've
seen this message. :)
I have a semi-finished version of the Superpatch ready to go, but I've been
slacking off on the documentation. It doesn't have any of Chris's stuff in
it, though.
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) |
Ron Parker wrote:
> > Any comments Ron ?
>
> Sorry, went to Minneapolis for a few days there so this is the first I've
> seen this message. :)
Is that somewhere near Minnesota ?
> I have a semi-finished version of the Superpatch ready to go, but I've been
> slacking off on the documentation. It doesn't have any of Chris's stuff in
> it, though.
Well glad to hear that you ain't slackin completely :~)
Semi-finished ?
--
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On Mon, 25 Oct 1999 17:51:45 -0700, Ken wrote:
>Is that somewhere near Minnesota ?
It's the suburbs of the Mall of America.
>Semi-finished ?
All the code is there, but I haven't done the splash screen yet. Tiny little
things like that.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |