![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I've ask in the Povray Bug Tracking System to raise the maxpower of the poly
object with one power to 16.
Le_Forgeron asked me for a genuine poly 16 file to test the system. It's
attached to this post.
If someone else is interested, there is a working poly 8 file too, so you
can play with a high power object.
Both files produces spirals that are build from a mathematical described
distorted Oval Torus (poly 8 and poly 16), followed by chopping up the
distorted torus in peaces that builds a spiral. No mesh or Isosurface is
used.
Jaap Frank
Post a reply to this message
Attachments:
Download 'us-ascii' (3 KB)
Download 'spiral_poly8.png' (135 KB)
Download 'us-ascii' (11 KB)
Download 'us-ascii' (36 KB)
Download 'us-ascii' (17 KB)
Preview of image 'spiral_poly8.png'
![spiral_poly8.png](/povray.binaries.scene-files/attachment/%3C4d096803%40news.povray.org%3E/spiral_poly8.png?ttop=441393&toff=200&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Le 16/12/2010 02:14, Jaap Frank nous fit lire :
> I've ask in the Povray Bug Tracking System to raise the maxpower of the
> poly object with one power to 16.
> Le_Forgeron asked me for a genuine poly 16 file to test the system. It's
> attached to this post.
There is a syntax error on line 318. Can you fix it (just post the
corrected line) ?
/* x^6.y^2.z^4 */ ,
-12*T6*P4*R4-48*T4*P2*R2*(5*R2+A2)-40*T2*(R2-A2)*R2+3*A2)
Notice the closing parenthesis with no opening.
So far I just tried to raise the limit (easily)... but it render only a
yellow stone and black sky.
I might take more time than expected if I have to found an actual
surface. (oh, well, I might provide a new syntax as well... it's too
late for 3.7 anyway). At least your demo scene confirmed me that a lot
of values are 0.
You are right about the code of binomial(): it is dead. (the array is
used all the time, due to the parser limiting the order)
In fact it is silly computing the binomial coefficient by the absolute
formula b(k,r) = k!/((k-r)! * r!), using optimisation of factoring the
numbers in stacks and removing common parts, to avoid big numbers.
It is also silly, because it try to factor for all odd numbers instead
of just primes. What a waste of modulo computation.
It is far simpler to know that it's the pascal's triangle, with
b(k,r)=b(k-1,r-1)+b(k-1,r) when r>0 and r<k;
b(k,0)=1 as well as b(k,k)=1.
Must have been some "smart" coding of that old time.
32 bits unsigned int can store down to depth 35.
64 bits go down to depth 69.
>
> If someone else is interested, there is a working poly 8 file too, so
> you can play with a high power object.
> Both files produces spirals that are build from a mathematical described
> distorted Oval Torus (poly 8 and poly 16), followed by chopping up the
> distorted torus in peaces that builds a spiral. No mesh or Isosurface is
> used.
>
> Jaap Frank
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
>"Le_Forgeron" schreef in bericht news:4d0a5fa2@news.povray.org...
>
>Le 16/12/2010 02:14, Jaap Frank nous fit lire :
>> I've ask in the Povray Bug Tracking System to raise the maxpower of the
>> poly object with one power to 16.
> >Le_Forgeron asked me for a genuine poly 16 file to test the system. It's
> >attached to this post.
>
>There is a syntax error on line 318. Can you fix it (just post the
>corrected line) ?
>
>/* x^6.y^2.z^4 */ ,
>-12*T6*P4*R4-48*T4*P2*R2*(5*R2+A2)-40*T2*(R2-A2)*R2+3*A2)
>
>Notice the closing parenthesis with no opening.
-12*T6*P4*R4-48*T4*P2*R2*(5*R2+A2)-40*T2*(R2-A2)*(R2+3*A2)
The opening parenthesis is just before the last R2 > > > > ^
In case I forgot an other one, all the factors look alike and have a
R2 and an A2 between the parenthesis and no other variables.
A few times there is a (R4 -A4).
>So far I just tried to raise the limit (easily)... but it render only a
>yellow stone and black sky.
Did you take a look at the poly8 file? It should give the same result.
I can't guarantee that the poly 16 formula is correct, but the result
looks oke.
>I might take more time than expected if I have to found an actual
>surface. (oh, well, I might provide a new syntax as well... it's too
>late for 3.7 anyway). At least your demo scene confirmed me that a lot
>of values are 0.
>
>You are right about the code of binomial(): it is dead. (the array is
>used all the time, due to the parser limiting the order)
>In fact it is silly computing the binomial coefficient by the absolute
>formula b(k,r) = k!/((k-r)! * r!), using optimisation of factoring the
>numbers in stacks and removing common parts, to avoid big numbers.
>It is also silly, because it try to factor for all odd numbers instead
>of just primes. What a waste of modulo computation.
>
>It is far simpler to know that it's the pascal's triangle, with
>b(k,r)=b(k-1,r-1)+b(k-1,r) when r>0 and r<k;
>b(k,0)=1 as well as b(k,k)=1.
>
>Must have been some "smart" coding of that old time.
When I searched my old stuf I found a manual for POV 0.5 beta,
together with one for POV-Ray 1.0gw (27 april 1992). There were
no poly objects in those times. I think they were introduced in version 2
or maybe stil later in version 3. That would make the code at least
15 years old.
But you are right, the Triangle of Pascal is far more simpler. I always
used the triangle to show the beauty of mathematics to students who
found mathematics dull and to difficult. They were always amazed
they could write out (a+b)^7 in a few moments and sometimes began
to like mathematics a bit because of that.
I would say, keep the hard code until pow 16 and use your way to
expand it if necessary.
>
>32 bits unsigned int can store down to depth 35.
>64 bits go down to depth 69.
Is it possible that high powers gives problems with the minimum (or
maximum) values that can be used. Values of 0.001 for x,y or z are
quit normal, but raised to power 16 you already get 1E-48. It may be
the reason for limiting to maxpower 15 in the past.
If that's a problem, stick to maxpower 16 then.
Thanks for reacting to my request.
Jaap Frank
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
>"Jaap Frank" schreef in bericht news:4d096803@news.povray.org...
>
>I've ask in the Povray Bug Tracking System to raise the maxpower of the
>poly
>object with one power to 16.
>Le_Forgeron asked me for a genuine poly 16 file to test the system. It's
>attached to this post.
>
>If someone else is interested, there is a working poly 8 file too, so you
>can play with a high power object.
>Both files produces spirals that are build from a mathematical described
>distorted Oval Torus (poly 8 and poly 16), followed by chopping up the
>distorted torus in peaces that builds a spiral. No mesh or Isosurface is
>used.
>
>Jaap Frank
In the poly 16 file there was one parenthesis avaporated in line 318.
In this file it is corrected, so overwrite it with this one. Le_Forgeron
is changing the allowed maxpower, so I hope we can use the file
in the future.
Jaap Frank
Post a reply to this message
Attachments:
Download 'us-ascii' (36 KB)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Le 16/12/2010 23:01, Jaap Frank nous fit lire :
> In the poly 16 file there was one parenthesis avaporated in line 318.
> In this file it is corrected, so overwrite it with this one. Le_Forgeron
> is changing the allowed maxpower, so I hope we can use the file
> in the future.
>
> Jaap Frank
I rendered the poly 16... part of it are noisy. I need to probably to
adjust some settings in the solver & poly code (if it can fix something
at all)
To ease the input, I'm adding a new syntax (no more ordering, you can
omit the coefficient at 0, it save a bit !)
#declare Spiral_Shape = object { polynom { 8
/* x^8 */ xyz(8,0,0): 1
/* x^6.y^2 */ xyz(6,2,0): 2*T2
/* x^6.z^2 */ xyz(6,0,2): 4
/* x^6 */ xyz(6,0,0): -2*((1-P2*T2)*R2+A2)
/* x^5.y */ xyz(5,1,0): -8*R2*Slope*T2
/* x^4.y^4 */ xyz(4,4,0): T2*T2
/* x^4.y^2.z^2 */ xyz(4,2,2): 6*T2
/* x^4.y^2 */ xyz(4,2,0): 2*T2*((1-P2*T2)*R2-A2)
/* x^4.z^4 */ xyz(4,0,4): 6
/* x^4.z^2 */ xyz(4,0,2): -2*((3-2*P2*T2)*R2+3*A2)
/* x^2.y^2.z^4 */ xyz(2,2,4): 6*T2
/* x^2.y^2.z^2 */ xyz(2,2,2): 2*T2*((2-P2*T2)*R2-2*A2)
/* x^2.z^6 */ xyz(2,0,6): 4
/* x^2.z^4 */ xyz(2,0,4): -2*((3-P2*T2)*R2+3*A2)
/* x^2.z^2 */ xyz(2,0,2): 2*(R2-A2)*((1+P2*T2)*R2-A2)
/* x.y.z^4 */ xyz(1,1,4): -8*R2*Slope*T2
/* y^4.z^4 */ xyz(0,4,4): T2*T2
/* y^2.z^6 */ xyz(0,2,6): 2*T2
/* y^2.z^4 */ xyz(0,2,4): 2*T2*(R2-A2)
/* z^8 */ xyz(0,0,8): 1
/* z^6 */ xyz(0,0,6): -2*(R2+A2)
/* z^4 */ xyz(0,0,4): (R2-A2)*(R2-A2)
/* C */ xyz(0,0,0): 0.000000001 sturm }
// end poly
} // end object
Post a reply to this message
Attachments:
Download 'neo8.pov.txt' (8 KB)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
>"Le_Forgeron" schreef in bericht news:4d0d02fc@news.povray.org...
>
>Le 16/12/2010 23:01, Jaap Frank nous fit lire :
>
>> In the poly 16 file there was one parenthesis evaporated in line 318.
>> In this file it is corrected, so overwrite it with this one. Le_Forgeron
>> is changing the allowed maxpower, so I hope we can use the file
>> in the future.
>>
>> Jaap Frank
>
>I rendered the poly 16... part of it are noisy. I need to probably to
>adjust some settings in the solver & poly code (if it can fix something
>at all)
I'm curious, is the central line along the y-axis disappeared?
If it is still there, then the fact that C = 0 may be the answer to that.
Maybe it is not possible to solve very high powers with the poly solver
correctly and you get a bit fuzzy answers.
I've find an other derivation leaving to poly 12, but the result
was not what I wanted, but it rendered well. Interested?
>To ease the input, I'm adding a new syntax (no more ordering, you can
>omit the coefficient at 0, it save a bit !)
>
>#declare Spiral_Shape = object { polynom { 8
>/* x^8 */ xyz(8,0,0): 1
>/* x^6.y^2 */ xyz(6,2,0): 2*T2
>/* x^6.z^2 */ xyz(6,0,2): 4
>/* x^6 */ xyz(6,0,0): -2*((1-P2*T2)*R2+A2)
>/* x^5.y */ xyz(5,1,0): -8*R2*Slope*T2
>/* x^4.y^4 */ xyz(4,4,0): T2*T2
>/* x^4.y^2.z^2 */ xyz(4,2,2): 6*T2
>/* x^4.y^2 */ xyz(4,2,0): 2*T2*((1-P2*T2)*R2-A2)
>/* x^4.z^4 */ xyz(4,0,4): 6
>/* x^4.z^2 */ xyz(4,0,2): -2*((3-2*P2*T2)*R2+3*A2)
>/* x^2.y^2.z^4 */ xyz(2,2,4): 6*T2
>/* x^2.y^2.z^2 */ xyz(2,2,2): 2*T2*((2-P2*T2)*R2-2*A2)
>/* x^2.z^6 */ xyz(2,0,6): 4
>/* x^2.z^4 */ xyz(2,0,4): -2*((3-P2*T2)*R2+3*A2)
>/* x^2.z^2 */ xyz(2,0,2): 2*(R2-A2)*((1+P2*T2)*R2-A2)
>/* x.y.z^4 */ xyz(1,1,4): -8*R2*Slope*T2
>/* y^4.z^4 */ xyz(0,4,4): T2*T2
>/* y^2.z^6 */ xyz(0,2,6): 2*T2
>/* y^2.z^4 */ xyz(0,2,4): 2*T2*(R2-A2)
>/* z^8 */ xyz(0,0,8): 1
>/* z^6 */ xyz(0,0,6): -2*(R2+A2)
>/* z^4 */ xyz(0,0,4): (R2-A2)*(R2-A2)
>/* C */ xyz(0,0,0): 0.000000001 sturm }
>// end poly
>} // end object
Splendid, that's far more easier! It makes the file better to read.
Do you start with all zero's and put the given factors in
their correct position? I expect something like that will
be the way to do that.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Le 19/12/2010 01:45, Jaap Frank nous fit lire :
> Do you start with all zero's and put the given factors in their correct
> position? I expect something like that will
> be the way to do that.
Yes. (I didn't want to change the internal, only the interface to input
the coefficients)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Le_Forgeron <jgr### [at] free fr> wrote:
....
> #declare Spiral_Shape = object { polynom { 8
....
http://www.merriam-webster.com/dictionary/polynom
--
Tor Olav
http://subcube.com
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Le 19/12/2010 13:00, Tor Olav Kristensen nous fit lire :
> Le_Forgeron <jgr### [at] free fr> wrote:
> ....
>> #declare Spiral_Shape = object { polynom { 8
> ....
>
> http://www.merriam-webster.com/dictionary/polynom
Your suggestion is welcome...
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Le_Forgeron <jgr### [at] free fr> wrote:
> Le 19/12/2010 13:00, Tor Olav Kristensen nous fit lire :
> > Le_Forgeron <jgr### [at] free fr> wrote:
> > ....
> >> #declare Spiral_Shape = object { polynom { 8
> > ....
> >
> > http://www.merriam-webster.com/dictionary/polynom
>
> Your suggestion is welcome...
How about polynomial ?
--
Tor Olav
http://subcube.com
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |