POV-Ray : Newsgroups : povray.binaries.images : Cheap Imitation and Generalization : Re: Cheap Imitation and Generalization Server Time
4 Nov 2024 22:18:19 EST (-0500)
  Re: Cheap Imitation and Generalization  
From: Bill Pragnell
Date: 16 Jan 2006 05:10:01
Message: <web.43cb6ff053bbec44731f01d10@news.povray.org>
Dave Matthews <ns### [at] nospamedu> wrote:

> The concern that makes it also not so simple is that
> for general splines, they do not cover a fixed curve length per unit
> time, so that, by using a simple "while" loop, some parts (of a
> stairway, for example) will get crunched together, while other parts
> will be stretched out.  I'm puzzling over a macro that will re-divide a
> spline to cover curve length at a steady rate (or has this already been
> done?)

I have done this for the latter instalment of my knot project. My algorithm
is slow (parse time > render time) but seems to do the trick. It entails
slowly moving along the path with very small increments in time, and
numerically integrating the distance travelled using repeated vlength()
calls. When the cumulative distance reaches a threshold, place an object
(in my case, a ring of bricks or a stair), reset the cumulative distance
counter and keep going.

This technique works perfectly, but there is still a small bunching effect
on the inside of steep curves where the ends of wide component objects
describe a shorter path than at the outside (e.g., large gaps between brick
layers on the outside of curves). I've partly solved this problem (for the
bricks, at least) by measuring the distance increment at various points
around the minor radius and scaling the objects accordingly. This too is
not fast :). See attached pic for results.

Bill

PS nice image! I might have to delve into higher-order knots for later
versions...


Post a reply to this message


Attachments:
Download 'trefoil6.jpg' (404 KB)

Preview of image 'trefoil6.jpg'
trefoil6.jpg


 

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