POV-Ray : Newsgroups : povray.beta-test : Filling in T values in splines : Re: Filling in T values in splines Server Time
29 Jul 2024 22:30:10 EDT (-0400)
  Re: Filling in T values in splines  
From: Rune
Date: 24 Feb 2002 05:41:34
Message: <3c78c35e@news.povray.org>
"Christopher James Huff" wrote:
> A suggestion: use macros for the entries.

Good suggestion, though I think I'll only use one macro, and still use the
idea about using an x for unspecified. IMO that's actually *more* clear, at
least indention-wise. However, I can get rid of the *y part. It also has
another advantage: The user can abbreviate vectors as floats, which is
particulary useful when one only wants to interpolate floats in the first
place. That's not possible in the pure macro solution, as all elements in a
vector macro has to be explicitely written as vectors, i.e. 0.1 doesn't
work, only <0.1,0.1,0.1> or 0.1*<1,1,1>.

> Using the vectors actually doesn't look that bad...'x' is
> pretty standard as a standin for "unknown", but something
> better could be used in place of 'y'...I don't think 'v'
> will work, POV might interpret it as a 2D vector.

It won't work.

> Maybe #declare T = y;? It could easily be overwritten by
> some scene variable though...

Yes.

> Hmm. How about this: use 4D vectors in the array.

Then all the vectors have to be explicitely written as 4D vectors, also the
points. Not a good solution.

I'll see if I can make the macro approach work well.

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated Feb 16)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

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