POV-Ray : Newsgroups : povray.binaries.utilities : Polynomial Spreadsheet Server Time
31 Oct 2024 12:15:43 EDT (-0400)
  Polynomial Spreadsheet (Message 3 to 12 of 12)  
<<< Previous 2 Messages Goto Initial 10 Messages
From: Alain
Subject: Re: Polynomial Spreadsheet
Date: 19 Oct 2017 18:42:58
Message: <59e92a72@news.povray.org>

> On 19/10/2017 20:31, Bald Eagle wrote:
>> Please test extensively and give feedback.
> 
> When trying to open it in Excel I get:
> 
> The file is corrupt and cannot be opened.
> 
> :-(
> 
No problem using Libre Office 5

Maybe Exel have problems using ODS files.


Post a reply to this message

From: Alain
Subject: Re: Polynomial Spreadsheet
Date: 19 Oct 2017 18:45:30
Message: <59e92b0a$1@news.povray.org>

> On 19/10/2017 20:31, Bald Eagle wrote:
>> Please test extensively and give feedback.
> 
> When trying to open it in Excel I get:
> 
> The file is corrupt and cannot be opened.
> 
> :-(
> 
Excuse me, but don't work here.
It opens without error, but it endlessly refresh itself.


Post a reply to this message

From: Stephen
Subject: Re: Polynomial Spreadsheet
Date: 19 Oct 2017 19:20:45
Message: <59e9334d$1@news.povray.org>
On 19/10/2017 23:43, Alain wrote:

>> On 19/10/2017 20:31, Bald Eagle wrote:
>>> Please test extensively and give feedback.
>>
>> When trying to open it in Excel I get:
>>
>> The file is corrupt and cannot be opened.
>>
>> :-(
>>
> No problem using Libre Office 5
> 
> Maybe Exel have problems using ODS files.

It is new install of Office 2013 and I've not set up many preferences 
and options. So problems are most likely at my end.

-- 

Regards
     Stephen


Post a reply to this message

From: Bald Eagle
Subject: Re: Polynomial Spreadsheet
Date: 19 Oct 2017 20:05:00
Message: <web.59e93cb563d226a55cafe28e0@news.povray.org>
Converted to Excel format.
Had to change my fancy exponent code because Excel still sucks.

Should at least work, even if the equation cell isn't as pretty  ;)


Post a reply to this message


Attachments:
Download 'polynomial 1.0.xls.dat' (197 KB)

From: Thomas de Groot
Subject: Re: Polynomial Spreadsheet
Date: 20 Oct 2017 02:59:01
Message: <59e99eb5$1@news.povray.org>
On 19-10-2017 21:31, Bald Eagle wrote:
> 
> Version 1.0
> 
> 

Just for the sake of completeness: It opened without a glitch in 
OpenOffice 4.1.3

Otherwise, I shall leave this alone. I do not have a mathematical mind :-)


-- 
Thomas


Post a reply to this message

From: jr
Subject: Re: Polynomial Spreadsheet
Date: 20 Oct 2017 05:36:58
Message: <59e9c3ba$1@news.povray.org>
hi,

On 20/10/2017 07:58, Thomas de Groot wrote:
> On 19-10-2017 21:31, Bald Eagle wrote:
>> Version 1.0
> Just for the sake of completeness: It opened without a glitch in
> OpenOffice 4.1.3

also appears ok in v 4.0.0.3.

> Otherwise, I shall leave this alone. I do not have a mathematical mind :-)

ibid.


regards, jr.


Post a reply to this message

From: B  Gimeno
Subject: Re: Polynomial Spreadsheet
Date: 23 Oct 2017 09:45:00
Message: <web.59edf1a863d226a5c95fc4120@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> Converted to Excel format.
> Had to change my fancy exponent code because Excel still sucks.
>
> Should at least work, even if the equation cell isn't as pretty  ;)

Open without problems with libreoffice 5.3.
When it comes to getting the results to Pov-Ray, that's when the trouble starts.
Is Kevin Bacon a universal constant now? According to the documentation, the
polynomial version of the syntax lacks the "command" parameter at first so that
the program starts processing. From the "function" version I lack experience to
know why it also gets stuck in the calculation. Greetings, and thank you for
sharing.

B. Gimeno


Post a reply to this message

From: Bald Eagle
Subject: Re: Polynomial Spreadsheet
Date: 23 Oct 2017 10:15:00
Message: <web.59edf89463d226a5c437ac910@news.povray.org>
"B. Gimeno" <nomail@nomail> wrote:


> Open without problems with libreoffice 5.3.
> When it comes to getting the results to Pov-Ray, that's when the trouble starts.

Good to hear.

> Is Kevin Bacon a universal constant now?

Well, sort of.  ;)
but only for 6th-degree polynomials   :D
https://www.youtube.com/watch?v=n9u-TITxwoM
http://www.sixdegrees.org/

>According to the documentation, the
> polynomial version of the syntax lacks the "command" parameter at first so that
> the program starts processing.

I'm not really sure what you mean by that.
it ought to be poly {
then a list of xyx (PowerX, PowerY, PowerZ):multiplier terms
}

From the "function" version I lack experience to
> know why it also gets stuck in the calculation. Greetings, and thank you for
> sharing.

It's certainly possible that there's a small typo or something in there.

I've had my hands full with a number of other things, but perhaps tomorrow I
will be able to review the spreadsheet and do some testing with scenes in
POV-Ray.


It would be easier for me debug anything or explain where your problems are if
you could post a short scene with the results of the spreadsheet that you copied
into the scene.

Thanks!


Post a reply to this message

From: Bald Eagle
Subject: Re: Polynomial Spreadsheet
Date: 23 Oct 2017 12:55:08
Message: <web.59ee1ec263d226a5c437ac910@news.povray.org>
So, the idea is that you can just plug in values for the exponents in the
applicable terms, and the top cells with have a correctly formatted syntax for
the poly{} object:

poly {4, <9, r2*r2, 1, -123, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, constant>}

or the polynomial {} object with the 'easy' syntax:

polynomial {xyz(4,0,0):9, xyz(3,1,0):r2*r2, xyz(3,0,1):1, xyz(3,0,0):-123,
xyz(2,2,0):1, xyz(2,1,1):1, xyz(2,1,0):1, xyz(2,0,2):1, xyz(2,0,1):1,
xyz(2,0,0):1, xyz(1,3,0):1, xyz(1,2,1):1, xyz(1,2,0):1, xyz(1,1,2):1,
xyz(1,1,1):1, xyz(1,1,0):1, xyz(1,0,3):1, xyz(1,0,2):1, xyz(1,0,1):1,
xyz(1,0,0):1, xyz(0,4,0):1, xyz(0,3,1):1, xyz(0,3,0):1, xyz(0,2,2):1,
xyz(0,2,1):1, xyz(0,2,0):1, xyz(0,1,3):1, xyz(0,1,2):1, xyz(0,1,1):1,
xyz(0,1,0):1, xyz(0,0,4):1, xyz(0,0,3):1, xyz(0,0,2):1, xyz(0,0,1):1,
xyz(0,0,0):constant}

or if you wanted to use the equation in a function, for an isosurface, then
that's available too:

#declare Polynomial = function {(9 * pow(x,4)) + (r2*r2 * pow(x,3) * y) +
(pow(x,3) * z) + (-123 * pow(x,3)) + (pow(x,2) * pow(y,2)) + (pow(x,2) * y * z)
+ (pow(x,2) * y) + (pow(x,2) * pow(z,2)) + (pow(x,2) * z) + (pow(x,2)) + (x *
pow(y,3)) + (x * pow(y,2) * z) + (x * pow(y,2)) + (x * y * pow(z,2)) + (x * y *
z) + (x * y) + (x * pow(z,3)) + (x * pow(z,2)) + (x * z) + (x) + (pow(y,4)) +
(pow(y,3) * z) + (pow(y,3)) + (pow(y,2) * pow(z,2)) + (pow(y,2) * z) +
(pow(y,2)) + (y * pow(z,3)) + (y * pow(z,2)) + (y * z) + (y) + (pow(z,4)) +
(pow(z,3)) + (pow(z,2)) + (z) + constant}

and all you have to do is copy and paste whichever syntax you want.

In the above examples, obviously r2 and constant need to be previously defined
variable names in your scene.


Post a reply to this message

From: Bald Eagle
Subject: Re: Polynomial Spreadsheet
Date: 24 Oct 2017 20:25:00
Message: <web.59efd8cb63d226a55cafe28e0@news.povray.org>
"B. Gimeno" <nomail@nomail> wrote:
According to the documentation, the
> polynomial version of the syntax lacks the "command" parameter at first so that
> the program starts processing.

I checked out the results using the data for the torus in the docs, and I think
I see what you mean.  polynomial {} requires the order of the equation followed
by the rest of the data.  I made the edit, and it should work fine now. [version
1.0a]


> From the "function" version I lack experience to
> know why it also gets stuck in the calculation. Greetings, and thank you for
> sharing.
>
> B. Gimeno

I'm not sure what you mean by "stuck" - does POV-Ray give you an error?
I had no problems when I copied and pasted the function into a scene:

#declare Polynomial = function {(pow(x,4)) + (2 * pow(x,2) * pow(y,2)) + (2 *
pow(x,2) * pow(z,2)) + (-104 * pow(x,2)) + (pow(y,4)) + (2 * pow(y,2) *
pow(z,2)) + (56 * pow(y,2)) + (pow(z,4)) + (-104 * pow(z,2)) + 784}

and then used that function in an isosurface:

isosurface {
 function {Polynomial (x, y, z)}
 accuracy 0.001
 max_gradient 4510
  contained_by {box {<-10, -4, -10>, <10, 4, 10>} }
  texture {pigment {DocPigment} finish {specular 0.2}}
} // end isosurface



I may see if I can work out some more refinements to make it a little easier to
use.  I could highlight the terms that need values (if they are non-zero) so
that it's easier to find the terms to edit.  There might also be a way for me to
consolidate the list of terms depending on the order - but that might take quite
a bit of tinkering.


Post a reply to this message


Attachments:
Download 'polynomial 1.0a.ods.dat' (47 KB)

<<< Previous 2 Messages Goto Initial 10 Messages

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