POV-Ray : Newsgroups : povray.general : Array of points for use with bicubic patch : Re: Array of points for use with bicubic patch Server Time
29 Jul 2024 14:23:33 EDT (-0400)
  Re: Array of points for use with bicubic patch  
From: Le Forgeron
Date: 25 Apr 2011 10:14:20
Message: <4db581bc$1@news.povray.org>
Le 25/04/2011 15:04, D103 nous fit lire :
> I am attempting to make a curtain out of bicubic patches. I want to create an
> array which contains all the points, which is easy enough, but I'm not sure how
> to then use the points in the patches.
> 
> This is the array I intend to use:
> 
> #declare BPatchPoints = array[4][16] {
>   { //points for first patch }
>   { //points for second patch }
>   { //points for third patch }
>   { //points for fourth patch }
> 
> Also, I'm wondering if I could use while loops to generate the points, which
> would make it easier to add randomness. Again, I'm not sure how to go about
> doing this, except perhaps using the loop to generate the array as well?

Have you read

> http://wiki.povray.org/content/Documentation:Tutorial_Section_3#Bicubic_Patch_Object

?

The corner of each grid should match. (aka, duplicate them)
The control points along the jointing line should also.

Do you really want to manage the 16 points of patch with 0-15, or use a
double index 0-3,0-3 instead ?

(array[n][4][4])

Or even simpler to understand: array[n][m][4][4]
n height
m width (as number of patch)


Post a reply to this message

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