POV-Ray : Newsgroups : povray.unofficial.patches : Clothsim constraints question, Megapov 1.21 : Re: Clothsim constraints question, Megapov 1.21 Server Time
28 Apr 2024 06:25:10 EDT (-0400)
  Re: Clothsim constraints question, Megapov 1.21  
From: Smellenbergh
Date: 18 Mar 2007 09:07:22
Message: <1hv6d4j.do84e8fn4z5pN%smellenbergh@skynet.be>
The original tutorial of Christophe Bouffartige's clothray can be found
at: http://tofbouf.free.fr/clothray/index_en.html
It doesn't contain more info on the constraints, but there is a page
with some example scenes at:
http://tofbouf.free.fr/clothray/mpg/mpg.html
You could check these to figure out how those extra's work.

Keep in mind that the .cth file is a list of grid points written row
after row. If you need to constraint points, you have to figure out
their sequence number in that list, and append them at the end.
In the .cth file add a line with:
  list_number, constraint.x, constraint.y, constraint.z
for each point that needs to be constarined.

Example; a 5*5 grid around the center where we want to hold that center
point at <0,0,0>
Add
  #fopen file "filename.cth" append
    #write(file, 12, ", 0.0, 0.0, 0.0,\n")
  #fclose file
in the scene file. This will be written as
  12, 0.0, 0.0, 0.0,
at the end of the .cth file. The center point is point number thirteen,
but we start counting from zero!!
The figures after the point number are restricting coefficients for each
direction. Zero means no movement. One means no restraint, and values in
between allow only for a fraction of the step.

I hope this gets you started,

-- 

e-mail:sme### [at] skynetbe

http://users.skynet.be/smellenbergh


Post a reply to this message

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