POV-Ray : Newsgroups : povray.general : Chain Question Server Time
4 Aug 2024 20:13:14 EDT (-0400)
  Chain Question (Message 1 to 5 of 5)  
From: Anthony D  Baye
Subject: Chain Question
Date: 27 Jan 2003 19:38:13
Message: <3E35D19B.C4D63069@Rapidnet.com>
I'm working on several small detail objects for a set of larger
scenes.  One of these is a rather tenchnological looking key, meant to
hang from a chain.  My problem is that creating the chain by hand would
be far beyond my patience and the only macro I've found for creating
chains is for hanging a chain, rope or other such object, between two
arbitrary points.  Such as might be found supporting a rope bridge or
other structure.
    Would anybody know where I could find a macro that creates a chain,
such as one might find on a pendant or necklace, that behaves like a
physical chain would in relation to other objects in the scene.  Or at
least how I might go about conceptualizing such a macro, if it is at all
possible?
    Any thoughts or ideas would be appreciated.


Anthony D. Baye


Post a reply to this message

From: Sir Charles W  Shults III
Subject: Re: Chain Question
Date: 27 Jan 2003 22:57:19
Message: <3e35ff9f$1@news.povray.org>
Make the key an anchor point and move it with mass and inertia.  That is a
good starting point.  Can I assume that the chain is around a neck or other
similar object?  You can easily enough assume that two points tangent to the
neck will be fixed for small movements.
    A real chain is more complex, and has every link responding to inertial
forces, but even a macro-created chain could provide you with the proper
locations of each point should you choose to calculate it that way.

Cheers!

Chip Shults
My robotics, space and CGI web page - http://home.cfl.rr.com/aichip


Post a reply to this message

From: Andrew Cocker
Subject: Re: Chain Question
Date: 28 Jan 2003 08:22:50
Message: <3e36842a@news.povray.org>
"Anthony D. Baye" <ban### [at] Rapidnetcom> wrote in message
news:3E35D19B.C4D63069@Rapidnet.com...
>     I'm working on several small detail objects for a set of larger
> scenes.  One of these is a rather tenchnological looking key, meant to
> hang from a chain.  My problem is that creating the chain by hand would
> be far beyond my patience and the only macro I've found for creating
> chains is for hanging a chain, rope or other such object, between two
> arbitrary points.  Such as might be found supporting a rope bridge or
> other structure.
>     Would anybody know where I could find a macro that creates a chain,
> such as one might find on a pendant or necklace, that behaves like a
> physical chain would in relation to other objects in the scene.  Or at
> least how I might go about conceptualizing such a macro, if it is at all
> possible?
>     Any thoughts or ideas would be appreciated.
>
Well, I can only offer theoretical advice, not a macro. Maybe you could do this:
Firstly, design the 2d path of your chain, as if viewed from directly above. Make a
spline of
this shape.
Sample along the spline, and at each sample point, use trace to determine the height
and
normal of the 'landscape' or floor of your scene. If you take  enough samples, it
should be
accurate. (You could then remove a few of these samples to simulate tension in the
chain ie.
where the chain goes from the top of one object to a lower one... the chain should be
someway
between taught and slack).
Then you have to create your single chain links, and translate, rotate them along this
new
path.

Sorry, that's all the help I can offer.

All the best,

Andy Cocker


Post a reply to this message

From: Johannes Dahlstrom
Subject: Re: Chain Question
Date: 28 Jan 2003 08:51:54
Message: <3e368af9@news.povray.org>
Anthony D. Baye wrote:

>     Any thoughts or ideas would be appreciated.

If you don't mind having to use an unofficial version of POV, Christoph 
Hormann's mechsim patch could probably do this (and much more). It's 
included in MegaPOV 1.0 too.

-Johannes


Post a reply to this message

From: Mike Williams
Subject: Re: Chain Question
Date: 28 Jan 2003 13:10:36
Message: <8jzo3BAxAoN+Ewsl@econym.demon.co.uk>
Wasn't it Anthony D. Baye who wrote:
>    I'm working on several small detail objects for a set of larger
>scenes.  One of these is a rather tenchnological looking key, meant to
>hang from a chain.  My problem is that creating the chain by hand would
>be far beyond my patience and the only macro I've found for creating
>chains is for hanging a chain, rope or other such object, between two
>arbitrary points.  Such as might be found supporting a rope bridge or
>other structure.
>    Would anybody know where I could find a macro that creates a chain,
>such as one might find on a pendant or necklace, that behaves like a
>physical chain would in relation to other objects in the scene.  Or at
>least how I might go about conceptualizing such a macro, if it is at all
>possible?
>    Any thoughts or ideas would be appreciated.
>

One way to get very good results (at the expense of quite a bit of hard
work) would be to use a patched version of POV that contains a mechanics
simulator, such as the one in MegaPOV 1.0

Model the chain as a series of masses and connections which start above
the other objects in the scene. One of the masses will represent the
link to which the key is attached, and that should be made much heavier
than the other masses. All the objects that the chain will interact with
will probably need to be modelled as isosurfaces (using the IsoCSG
library if necessary). Run the simulation for a sufficient number of
frames for the motion to stop. Then, don't use MechSim_Show_All_Objects
to display the results (because then you get a set of balls and struts
instead of a chain), but obtain the position of each mass with
  #declare P[N]=mechsim:mass(N):position;
and place your links at those points.

A simpler way, but which produces inaccurate results would be to use
trace() to find out if there's a point on the underlying surface
vertically below a link and consider dropping the link down to that
point, storing the traced positions in an array. Then check each link to
see if has dropped too far below its neighbours and lift it as required.
Repeat the checking and lifting until all the links are close enough to
their neighbours.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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