POV-Ray : Newsgroups : povray.binaries.animations : Pigment-mapped Bouncing Ball ... (DIVX5.02 AVI, 313KB) Server Time
19 Jul 2024 13:28:08 EDT (-0400)
  Pigment-mapped Bouncing Ball ... (DIVX5.02 AVI, 313KB) (Message 2 to 11 of 11)  
<<< Previous 1 Messages Goto Initial 10 Messages
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>
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

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>
"Michael Andrews" <m.c### [at] readingacuk> 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

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'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] gmxde

> 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

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>
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

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>
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

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>
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

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>
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

From: Tor Olav Kristensen
Subject: Re: Pigment-mapped Bouncing Ball ... (DIVX5.02 AVI, 313KB)
Date: 24 Feb 2003 14:34:58
Message: <Xns932CD21C52BB5torolavk@204.213.191.226>
Michael Andrews <m.c### [at] readingacuk> 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

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>
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

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>
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

<<< Previous 1 Messages Goto Initial 10 Messages

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