POV-Ray : Newsgroups : povray.binaries.animations : Rolling (MPG1, 382kb) : Re: Rolling (MPG1, 382kb) Server Time
5 Jul 2024 11:47:16 EDT (-0400)
  Re: Rolling (MPG1, 382kb)  
From: Rune
Date: 6 Aug 2005 03:13:08
Message: <42f46304@news.povray.org>
Tim Nikias wrote:
>> If you've done it some different way, I'd be curious to hear how. :)
>
> Nope, looks like I'm doing it much the same way, though I store all
> three axis' and the position of the ball in an external file.

Sure, not much difference if you store two vectors or all three. I also 
stored the information in an external file of course, being the only way to 
transfer data from frame to frame. :) Btw. I think it's a good idea to once 
in a while (or just in every frame to make it simpler) force the three 
vectors to be perpendicular to each other to prevent accumulated precision 
errors to slowly skew the matrix.

> I'm not yet sure how to pull it off, but I also want to script some
> functionality to have balls stay in a relative global position of the
> original rolling sphere (like always on top), but roll as if moved by
> the parent. One idea I had for a robot-like character was to have the
> main sphere's upper hemisphere covered with some metallic surface,
> and in these I set several such smaller spheres that are supposedly
> electromotors or such to move the big sphere.

So if the big sphere is not just a ball but also a vehicle, then you'd need 
to store vectors for the vehicle's alignment as well as for the ball's, the 
difference being that the vehicle keeps having an up-vector that corresponds 
to the up-vector of the ground, and a forward-vector that is the direction 
the vehicle moves in (typically). This, along with the position, which is 
the same as for the ball, could be used to get the transformation for the 
vehicle's upper hemisphere etc., which stays fixed regardless of the ball's 
rotation. From this, it should be no problem to calculate global points that 
are in a fixed relative position to the vehicle.

Your project sound very interesting. I'm looking forward to see the 
progress. :)

Rune
-- 
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

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