|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"shapes.inc" defines a cylinder of infinite length that runs along the
X axis as:
#declare Cylinder_X =
quadric
{<0, 1, 1>,
<0, 0, 0>,
<0, 0, 0>, -1
}
Is there some similar way to generate an infinite 2D array of these
cylinders along with some way to either control their spacing or
diameter?
Ouroborus
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
our### [at] hotmailcom wrote:
> Is there some similar way to generate an infinite 2D array of these
> cylinders along with some way to either control their spacing or
> diameter?
Interesting idea, that. I'm not sure to what extent it would be
possible.
The problem, insofar as I understand it, is that a ray could intersect
an infinite number of these cylinders--or possibly none at all. Assuming
the worst-case scenario, there has to be a way to decide which set of
intersections to use, since the shape could be used in a CSG object
which would require a number of intersections to be found for
comparisons. Throw in the possibility of several of these arrays
interacting in a CSG, and you've got yourself a worst-case scenario.
I think the only way this could reasonably be done would be to use an
isosurface, a la the Superpatch. A function like this might do the
trick:
#declare cylarray = function {
sqr(x-floor(x+0.5))+sqr(z-floor(z+0.5))-0.25 }
floor() doesn't exist in the current Superpatch--it needs to be added
in. I've got such a modification working myself, though. Heck, maybe
I'll try to render a scene like this to show you.
Lummox JR
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
our### [at] hotmailcom wrote:
>
> "shapes.inc" defines a cylinder of infinite length that runs along the
> X axis as:
>
> #declare Cylinder_X =
> quadric
> {<0, 1, 1>,
> <0, 0, 0>,
> <0, 0, 0>, -1
> }
>
> Is there some similar way to generate an infinite 2D array of these
> cylinders along with some way to either control their spacing or
> diameter?
While a #while loop would do a good job of simulating such an array, I
was hoping for a poly, cubic, quartic or quadric that would produce such
a shape (an infinate 2D array of infinately long cylinders).
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
our### [at] hotmailcom wrote:
: While a #while loop would do a good job of simulating such an array, I
: was hoping for a poly, cubic, quartic or quadric that would produce such
: a shape (an infinate 2D array of infinately long cylinders).
I don't think you can make any repeating pattern with a polynomial
equation. I may be wrong though...
Usually for repeating patterns you need some repeating function (like sine
or cosine). It may be possible with the superpatch.
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Nieminen Mika <war### [at] cctutfi> wrote in message
news:379c0a93@news.povray.org...
> our### [at] hotmailcom wrote:
> : While a #while loop would do a good job of simulating such an array, I
> : was hoping for a poly, cubic, quartic or quadric that would produce such
> : a shape (an infinate 2D array of infinately long cylinders).
>
> I don't think you can make any repeating pattern with a polynomial
> equation. I may be wrong though...
Nope, absolutely right.
Trig functions will give a reasonable approximation, but to get real
cylinders I'd want to use fractional_part or something similar:
x = sqrt(1 - (2*y - round(2*y)*(2*y-round(2*y))
-Robert Dawson
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|