To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 2480
2479  |  2481
Subject: 
Re: POV-Ray Chain Program
Newsgroups: 
lugnet.cad.dev
Date: 
Mon, 2 Aug 1999 10:06:24 GMT
Viewed: 
999 times
  
In lugnet.cad.dev, Jonathan Wilson writes:
Hi,

I'll check out the math and look for a more LDraw-like approach. I had already
some problems with the elastic parts, and now indeed need a chain for OMR 8844
(blue small helicopter). My first intention was/is to search for 3D-spline-
editors instead of bezier-curves. Your idea is a good new idea I'll look at
that too. When I've desided which way to go (3D-splines versus 2D polygon-
fitting and rotating (which is the basic idea of the page you mentioned)) I
think I'll start a discussion to get out a functional description of such a
program. (I've programmed a lot the last 5 years and also have some good
programming friends)

Bart Titulaer



Adam Howard wrote:

Hi All!

I was surfing the web the other day and discovered a wonderful plug-in for
POV-Ray that can create chains.  Considering all the talk about hoses and a
desire for the chain piece in Ldraw I thought it would be great if this
programs ideas could be used to develop a similar program for ldraw.  I sent
an email to the author asking what math he used and how he went about
programming it.  He replied with the following email:

"Hi - I forwarded this to me at work, because my internet connection was
down
at home...
anyhow...

If you downloaded the .inc, and you know POV the math
is there for all to see;-)

In short (and going from memory):

I use the formula for a catenary (look for Andrews
treasure trove of mathematics if you can't find it
anywhere else, I don't have the URL handy).

I curve fit the catenary formula given the two points,
mapping one to 0,0 and the other to x,y.  (After the
chain is built I rotate it and translate it to the
proper location.

because there are an infinite number of curves that
can pass through two points, I use a variable to set
the "length" (through the droop) of the curve.

I initially calculated the slope to map each link, but this
really didn't work.  In my final solution I determined
the endpoint of the each link by iteratively solving (binomial
search) the curve equation and comparing the distance between
this point and the current point using an error variable so the
loops didn't go too deep.  Repeat for the next link.

I initially planned to reverse this, so you could specify
the length of the chain (number of links) and it would
determine the missing value to scale the chain appropriately
but doing it iteratively caused POV to break.

If the source isn't clear enough, drop me a line back.

-Rob"

You can find his program at http://www.geocities.com/SoHo/7865/chain.htm

I am not a good computer programmer.  So I just wanted to throw this idea
out and see if anyone else would like to work on a chain/hose/rope plug-in
for ldraw.

Thanks,
Adam

cool idea.



Message is in Reply To:
  Re: POV-Ray Chain Program
 
(...) cool idea. (25 years ago, 30-Jul-99, to lugnet.cad.dev)

3 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR