![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Rick [Kitty5]
Subject: Re: Pigment-mapped Bouncing Ball ... (DIVX5.02 AVI, 313KB)
Date: 20 Feb 2003 05:35:57
Message: <3e54af8d$4@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Michael Andrews wrote:
> Hope you like this one.
Looks so much better with a Texture on the ball - reminds me of the old
Amiga ball demo
--
Rick
Kitty5 NewMedia http://Kitty5.co.uk
POV-Ray News & Resources http://Povray.co.uk
TEL : +44 (01270) 501101 - FAX : +44 (01270) 251105 - ICQ : 15776037
PGP Public Key
http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0x231E1CEA
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Andrew Cocker
Subject: Re: Pigment-mapped Bouncing Ball ... (DIVX5.02 AVI, 313KB)
Date: 20 Feb 2003 05:37:02
Message: <3e54afce@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Michael Andrews" <m.c### [at] reading ac uk> wrote in message
news:3e54a341@news.povray.org...
> Hi Folks,
>
> As suggested, I wrote a transformation macro to align a pigment using
> three points. Turned out to be very simple, the idea based on the
> Point_At_Trans() macro.
>
> It also uses radiosity and the Skylight dome generator by Philippe
> Debar. I do need to make a modification of this to write the mesh out as
> an include and just read it back in for each frame, rather than
> rebuilding it each time :-/
>
> Hope you like this one.
I do.. I do! Top marks.. 100%. Really great work there. What's the sim time per frame?
All the best,
Andy Cocker
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Tim Nikias
Subject: Re: Pigment-mapped Bouncing Ball ... (DIVX5.02 AVI, 313KB)
Date: 20 Feb 2003 05:55:19
Message: <3e54b417@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I've got an include which could be suited for the job:
the IO-Macros, which you can find on my homepage.
They'll at least write an array (any 5-dimensional) to
disk and may load it. But they may not be what you want,
still you might want to have a look at those for input-output
"examples".
Regards,Tim
--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmx de
> Hi Folks,
>
> As suggested, I wrote a transformation macro to align a pigment using
> three points. Turned out to be very simple, the idea based on the
> Point_At_Trans() macro.
>
> It also uses radiosity and the Skylight dome generator by Philippe
> Debar. I do need to make a modification of this to write the mesh out as
> an include and just read it back in for each frame, rather than
> rebuilding it each time :-/
>
> Hope you like this one.
>
> Bye for now,
> Mike Andrews.
>
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Michael Andrews
Subject: Re: Pigment-mapped Bouncing Ball ... (DIVX5.02 AVI, 313KB)
Date: 20 Feb 2003 08:06:29
Message: <3e54d2d5$1@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Rick [Kitty5] wrote:
> Looks so much better with a Texture on the ball - reminds me of the old
> Amiga ball demo
Hi Rick,
Yes, the texturing adds a lot. I surprised myself with how easy the
orientation macro was to write:
#macro Three_Point_Trans(T1a, T1b, T1c, T2a, T2b, T2c)
transform {
#local Y = vnormalize(T1b - T1a);
#local X = vnormalize(T1c - T1a);
#local Z = vnormalize(vcross(X, Y));
#local X = vcross(Z, Y);
#local T = Shear_Trans(X, Y, Z)
translate -T1a
transform { T inverse }
#local Y = vnormalize(T2b - T2a);
#local X = vnormalize(T2c - T2a);
#local Z = vnormalize(vcross(X, Y));
#local X = vcross(Z, Y);
Shear_Trans(X, Y, Z)
translate T2a
}
#end
The three points a,b,c define a triangle; a is the origin, b-a is the
primary orientation and abc gives a secondary orientation plane. The two
orientation axes b-a and c-a do not have to be orthogonal, just
independant so vcross(b-a,c-a) doesn't return a zero length vector.
So Three_Point_Trans(0,y,x, P0,P1,P2) gives a transform from the origin
to P0, aligns y with P1-P0 and puts the (x,y) plane in the plane of the
(P0,P1,P2) triangle.
I never actually had an Amiga; Atari 400, Acorn Electron, BBC B, various
PC types ... I wrote my first (spheres only) raytracer on my Electron,
16 colour error-diffusion dithered screen output only :-) The hardware
and software have improved immeasurably, it's a shame I still can't
produce anything artistic :-(
Bye for now,
Mike Andrews.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Michael Andrews
Subject: Re: Pigment-mapped Bouncing Ball ... (DIVX5.02 AVI, 313KB)
Date: 20 Feb 2003 08:13:19
Message: <3e54d46f@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Hi Andrew,
Andrew Cocker wrote:
> I do.. I do! Top marks.. 100%. Really great work there.
Thanks :-)
>What's the sim time per frame?
Quite quick; parsing time averaged 23.5 seconds per frame, but most of
that was building the skylight mesh. I didn't notice what the actual sim
time was.
The sim has 151 masses, 594 connections, 296 faces and 2500 steps.
Bye for now,
Mike Andrews.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Michael Andrews
Subject: Re: Pigment-mapped Bouncing Ball ... (DIVX5.02 AVI, 313KB)
Date: 20 Feb 2003 08:20:01
Message: <3e54d601$1@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Hi Tim,
Tim Nikias wrote:
> I've got an include which could be suited for the job:
> the IO-Macros, which you can find on my homepage.
> They'll at least write an array (any 5-dimensional) to
> disk and may load it. But they may not be what you want,
> still you might want to have a look at those for input-output
> "examples".
Not really what I want, but thanks for the thought. For reusing things
like meshes in an animation I usually write the complete mesh to a file
on the first frame and then just #include "hull.msh" or whatever on
subsequent frames. It only takes a couple more #writes() and I don't
have to worry about parsing anything back in - just let PoV do the work
for me :-)
Bye for now,
Mike Andrews.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Christoph Hormann
Subject: Re: Pigment-mapped Bouncing Ball ... (DIVX5.02 AVI, 313KB)
Date: 24 Feb 2003 08:11:35
Message: <3E5A1A06.717F86C2@gmx.de>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Michael Andrews wrote:
>
> Hi Folks,
>
> As suggested, I wrote a transformation macro to align a pigment using
> three points. Turned out to be very simple, the idea based on the
> Point_At_Trans() macro.
Nice. Is the mass distribution between rim masses and central mass correct
so you get a correct moment of inertia? Maybe you should also try making
one side of the ball heavier. I think this would look interesting.
Christoph
--
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 31 Dec. 2002 _____./\/^>_*_<^\/\.______
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) |
Michael Andrews <m.c### [at] reading ac uk> wrote in
news:3e54d2d5$1@news.povray.org:
...
>I surprised myself with how easy the
> orientation macro was to write:
>
> #macro Three_Point_Trans(T1a, T1b, T1c, T2a, T2b, T2c)
> transform {
> #local Y = vnormalize(T1b - T1a);
> #local X = vnormalize(T1c - T1a);
> #local Z = vnormalize(vcross(X, Y));
> #local X = vcross(Z, Y);
> #local T = Shear_Trans(X, Y, Z)
> translate -T1a
> transform { T inverse }
> #local Y = vnormalize(T2b - T2a);
> #local X = vnormalize(T2c - T2a);
> #local Z = vnormalize(vcross(X, Y));
> #local X = vcross(Z, Y);
> Shear_Trans(X, Y, Z)
> translate T2a
> }
> #end
>
> The three points a,b,c define a triangle; a is the origin, b-a is
> the primary orientation and abc gives a secondary orientation plane.
> The two orientation axes b-a and c-a do not have to be orthogonal,
> just independant so vcross(b-a,c-a) doesn't return a zero length
> vector.
>
> So Three_Point_Trans(0,y,x, P0,P1,P2) gives a transform from the
> origin to P0, aligns y with P1-P0 and puts the (x,y) plane in the
> plane of the (P0,P1,P2) triangle.
...
Here is a slightly modified version of that macro:
#macro ThreePoint_Trans(pA1, pB1, pC1, pA2, pB2, pC2)
#local vY1 = vnormalize(pB1 - pA1);
#local vZ1 = vnormalize(vcross(pC1 - pA1, vY1));
#local vX1 = vcross(vZ1, vY1);
#local T1 = transform { Matrix_Trans(vX1, vY1, vZ1, pA1) inverse }
#local vY2 = vnormalize(pB2 - pA2);
#local vZ2 = vnormalize(vcross(pC2 - pA2, vY2));
#local vX2 = vcross(vZ2, vY2);
#local T2 = transform { Matrix_Trans(vX2, vY2, vZ2, pA2) }
transform { T1 T2 }
#end // macro ThreePoint_Trans
Tor Olav
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Michael Andrews
Subject: Re: Pigment-mapped Bouncing Ball ... (DIVX5.02 AVI, 313KB)
Date: 25 Feb 2003 07:07:00
Message: <3e5b5c64$1@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Hi Tor Olav,
Tor Olav Kristensen wrote:
> Here is a slightly modified version of that macro:
>
>
> #macro ThreePoint_Trans(pA1, pB1, pC1, pA2, pB2, pC2)
>
> #local vY1 = vnormalize(pB1 - pA1);
> #local vZ1 = vnormalize(vcross(pC1 - pA1, vY1));
> #local vX1 = vcross(vZ1, vY1);
> #local T1 = transform { Matrix_Trans(vX1, vY1, vZ1, pA1) inverse }
> #local vY2 = vnormalize(pB2 - pA2);
> #local vZ2 = vnormalize(vcross(pC2 - pA2, vY2));
> #local vX2 = vcross(vZ2, vY2);
> #local T2 = transform { Matrix_Trans(vX2, vY2, vZ2, pA2) }
>
> transform { T1 T2 }
>
> #end // macro ThreePoint_Trans
>
>
> Tor Olav
Nice. I used the Shear_Trans() macro because that's what the
Point_At_Trans() macro used, I didn't think to use the Matrix_Trans() to
do the shear and translate in one go. Kudos to you :-)
Bye for now,
Mike Andrews.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Michael Andrews
Subject: Re: Pigment-mapped Bouncing Ball ... (DIVX5.02 AVI, 313KB)
Date: 25 Feb 2003 07:18:23
Message: <3e5b5f0f$1@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Hi Christoph,
Christoph Hormann wrote:
> Nice. Is the mass distribution between rim masses and central mass correct
> so you get a correct moment of inertia? Maybe you should also try making
> one side of the ball heavier. I think this would look interesting.
>
> Christoph
>
The ball is effectively an inflated skin, the only significant mass is
on the shell with the central mass just being a place holder to attach
the "air pressure" connections. The point masses are an approximation of
the surface area neighbourhood of the point.
An asymetric weighting of the ball might be fun to try, I'll give it a
go ...
Bye for now,
Mike Andrews.
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) |