|
![](/i/fill.gif) |
I think that your current approach is ok. An array of 100 or even 1000
vectors doesn't take too much memory (in current computers we have plenty),
but copying arrays too often is too slow with POV-SDL (perhaps in pov4 we
will have dynamic arrays anyways, so it will not be a problem there).
If there are hundreds of splines, each one of them containing 101 points,
then the waste of memory is really considerably, so I think there should
be a way of telling the macro the amount of points to reserve (in a similar
way you can tell a std::vector in C++ to allocate space for a specific
amount of items).
This could be just a macro which is called before specifying the points
(like the one in your earlier suggestion). It could be used if you know that
the automatic space reservation will waste too much space.
--
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}// - Warp -
Post a reply to this message
|
![](/i/fill.gif) |