|
|
"scott" <sco### [at] spamcom> wrote:
> PM 2Ring wrote:
> > The catenary is the curve formed by a homogeneous chain suspended
> > between two points in a uniform gravity field. It looks like a
> > parabola, but it's mathematically quite different. The equation of a
> > parabola is just y = a*x*x, a simple quadratic, whereas a catenary is
> > y = a*cosh(x/a), a transcendental equation.
> How about a comparison between the two for different length chains between
> two points?
Here are two sets of comparisons between parabolas & catenaries, suspended
between the same two points, passing through the same lowest point (almost
:). It was too hard to do them with equal length chains: the _LN_length
parameter in Link.inc does weird things...
The blue chains are parabolas, the red chains are catenaries, using these
links objects:
#declare SC = 0.02;
#declare RodC = cylinder{-x, x, 1 pigment{checker rgb x,rgbt 1} scale SC}
#declare RodP = cylinder{-x, x, 1 pigment{checker rgb z,rgbt 1} scale SC}
I won't post the full source, it's a bit ugly.
Post a reply to this message
Attachments:
Download 'catenaryi3.jpg' (188 KB)
Preview of image 'catenaryi3.jpg'
|
|
|
|
This chain uses an interesting texture posted by Ross a few months ago.
See thread containing Message: <42c5bb9d@news.povray.org> for details
//Chain making macro
#include "Catenary.inc"
#declare Use_Normal = 1;
#declare Shiny = finish {ambient 0 specular 1 roughness 0.003 diffuse 0.3
reflection {0.2, 0.4 fresnel on} }
#declare Dull= finish {ambient 0 specular 0.6 roughness 0.03 diffuse 0.3 }
#declare Turb = <0.34, 0.3, 0.7>;
//Create a multi-warped pattern
#macro Pat(Step)
leopard scale 0.15
#local I = Step;
#while (I > 0)
warp {repeat x flip y}
warp {turbulence Turb}
scale 1.2
#local I = I - 1;
#end
#end
//Create texture using multi-warped pattern for normals & texture_map
#macro Tex(Step)
#local fnPat = function {pattern {Pat(Step)}}
#local n1 = normal {function {fnPat(x, y, z)} bump_size 2}
#local t1 = texture {pigment {rgb 1} finish {Shiny} #if(Use_Normal) normal
{n1} #end }
#local t2 = texture {pigment {rgb 0.2} finish {Dull} #if(Use_Normal)
normal {n1} #end }
function {fnPat(x, y, z)}
texture_map {[0 t1][1 t2]}
#end
//-------------------------------------------------------------------------
//Simple chain macro. Parameters: Start point,End Point
#macro ChainQ(Start, End) Chain(Link, Start, End, Slack, Overlap, Twist)
#end
//Chain terminal post
#macro Terminal(Pos)
union{
sphere{Pos, PostRad*1.6}
cylinder{Pos*<1,0,1>, Pos-0.35*PostRad*y, PostRad}
//pigment{rgb <.2, .5, 1>}
//finish{Dull}
//texture{Tex(8) scale PostRad}
}
#end
//Chain, with terminal at start
#macro TermChain(Start, End)
union{
Terminal(Start)
ChainQ(Start, End)
}
#end
//Link objects
#declare Torus = torus {.75, .175 scale 0.035*<1, 1, .65> }
#declare Torus1 = object {Torus scale 3 rotate 90*x}
//Chain parameters
#declare Link = Torus1; //Link object
#declare Slack = 1.25; //Slackness of the chain.
#declare Overlap = 1.65; //Link overlap
#declare Twist = 0; //Chain twist (in cycles)
#declare PostRad= 0.10; //Post radius
//-------------------------------------------------------------------------
/**** test scene ****/
sky_sphere {
pigment {
gradient y
color_map {
[0.0 rgb <0.6,0.7,1.0>*.85]
[0.6 rgb <0.0,0.1,0.8>*.75]
}
}
}
#declare Sandy = colour rgb <1, .80, 0.45>;
#declare PSand = pigment{
granite scale 1e-3
colour_map{
[0 Sandy*.80]
[0.5 Sandy]
[1 Sandy*1.50]
}
}
//Ground
plane {
y, -1e-3
texture {
pigment {PSand}
finish{ambient 0 diffuse .8 brilliance 0.75 specular 1 roughness 3e-3}
normal{
average
normal_map{
[1.5 wrinkles scale 3 bump_size 1]
[.5 granite scale 1e-2 bump_size .75]
}
}
}
}
//Points to connect
#declare V0 = <-1, 1, 0>;
#declare V1 = < 1, 1, 0>;
#if(1)
union{
Terminal(V1)
TermChain(V0, V1)
texture{Tex(12) scale .5*PostRad}
}
#end
camera {
right x*image_width/image_height up y
direction z
location <0, 3*2.5, -12> * 0.375 * .275
look_at y*.75 * .75
angle 30
}
light_source {<1, 5, -3.5>*50 rgb 1}
//------------------------------------------------------------
Post a reply to this message
Attachments:
Download 'rnchaina1.jpg' (79 KB)
Preview of image 'rnchaina1.jpg'
|
|
|
|
Mike Raiford <mra### [at] hotmailcom> wrote:
> PM 2Ring wrote:
>
> > I didn't like the first result I got, but this one is rather tasty, if I do
> > say so myself. :)
>
> I sooooo agree!
>
> wow.. Nice :)
Thanks, Mike!
>
> I'm still debating whether its glass or plexiglass, though. I'm leaning
> toward saying it looks like glass.
It /should/ be glass; see below for the relevant parameters. I used the
two-pass method of rendering a half-size no AA version to generate the
photon & radiosity files.
I've been polishing up the Chain() macro & have written some user
documentation for it. Do you have any suggestions?
///////////////////////
global_settings {
assumed_gamma 1.0
#if(Use_Photons)
photons {
autostop 0
count 28e4
#if(Use_Photons=2)save_file PhotonFile #end
#if(Use_Photons=3)load_file PhotonFile #end
}
#end
#if(Use_Radio)
radiosity{
pretrace_end 0.01
always_sample 1
#if(Use_Radio=2)save_file RadioFile #end
#if(Use_Radio=3)load_file RadioFile pretrace_end 1 always_sample 0 #end
}
#end
max_trace_level 25
}
#declare TGlass0 =
texture{
pigment{rgbf<.9, .975, 1, 1>}
finish{F_Glass8}
}
#declare Torus1 =
object {
Torus
texture{TGlass0}
//pigment{rgb x}finish{ambient 0 reflection .1 specular 1}
interior {
ior 1.5
dispersion 1.05
//dispersion_samples 5 //20
#if(!Use_Photons) caustics 1 #end
}
photons {
target 1
refraction on
reflection on
collect on
}
}
///////////////////////
Post a reply to this message
|
|