POV-Ray : Newsgroups : povray.binaries.animations : elastic cube, pov code, 800 kB : Re: elastic cube, pov code, 800 kB Server Time
20 Jul 2024 01:16:44 EDT (-0400)
  Re: elastic cube, pov code, 800 kB  
From: Gergely Vandor
Date: 17 May 2002 11:21:53
Message: <Xns9211B0A04A1ABgergelyvamoraviaitco@204.213.191.226>
Christoph Hormann <chr### [at] gmxde> wrote in
news:3CE4CA62.8CB5D1F8@gmx.de: 
>> It took 5 mins on an 1400 MHz Athlon XP, which I consider slow, this
>> thing should be possible realtime on my machine. :) The five mins is a
>> guess, I did't even check. 
> 
> I would not call this slow, the recent 12 balls animations usually
> parse about 10 seconds per frame and render 5 seconds on a K6/500.

So it's probably faster than mine, while it's at least as complicated, or? 
:) It's the parse time that I consider relevant here.

> 
>> System: In every "row", every second node is connected as well as the
>> adjacent ones, and every "sub-cube" has an X of springs on its sides.
>> The slowness is due to silly code (this is my first ever try at stuff
>> like this) and overkill (?) precision (20 steps/frame). 
> 
> I don't really understand that description, do you use any 3D diagonal
> springs?  Maybe just render a still with cylinders where the springs
> are. How did you model damping?

There are no 3D diagonal springs. I'll try to describe the system again :)

So there are diagonal springs on the sides of the subcubes (if you look at 
the anim, the cube is made up of 4*4*4=64 pieces of what I call subcubes). 
Also if you start from a corner, and go any direction, the first node is 
connected with the second *and* the third as well, and so on. (The second 
is connected with the third and the fourth, etc.) This is something I read 
about in a paper about cloth simulation somewhere. I hope it's more 
understandable now, it's not that easy to explain for me. :)

Damping is not really modelled. :) I just multiplied the speed of every 
node with a value like 0.9995 or something at every timestep. If you have a 
better solution for spring damping pleeeeeaaase let me know. :)

It would be interesting to use the inside macro at the beginning of things, 
so with a high number of nodes one could make elastic objects of any shape. 
:) Maybe that will be my next project.

I also faintly remember that Hooke's spring constant is in fact *not* 
constant when the length of a spring changes beyond a certain point. And 
I'd like to try objects with different stiffness at different points... 
Physics can really be fascinating. :)


--
Cheers,
Gergely


Post a reply to this message

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