POV-Ray : Newsgroups : povray.advanced-users : Polynomial Vector / Syntax tool : Re: Polynomial Vector / Syntax tool Server Time
25 Apr 2024 10:32:15 EDT (-0400)
  Re: Polynomial Vector / Syntax tool  
From: Le Forgeron
Date: 22 Oct 2017 11:45:25
Message: <59ecbd15@news.povray.org>
Le 18/10/2017 à 16:17, Bald Eagle a écrit :
> 
> I came across a thing I wanted to visualize, and of course it was some insane
> 8th-order polynomial --- in unexpanded/simplified form, of course.
> 
> After getting the equation, finding an online polynomial calculator, wrestling
> with a bug, and getting the simplified expansion, I moved on to starting on
> converting it to POV-Ray syntax.
> 
> The docs state:
> 
> "Writing the polynomial vector
> .....
> 
> Note: It is also possible to make a little program with your favorite
> programming language which will print the poly vector from the polynomial
> function, but making a program like this is up to you."
> 
> So, not being dissuaded by the 120 terms in the polynomial syntax, I copied and
> pasted the table from the docs into OpenOffice Calc and have most of it worked
> out.
> 
> Does anyone have a link to prior work on this?
> Has someone actually written a program to return a polynomial vector or the
> simplified syntax?

The simplified syntax has a lot of my preference.

http://wiki.povray.org/content/Documentation:Tutorial_Section_3.2#Polynomial_made_easy

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

A term like a.x² become xyz(2,0,0):a,

No need for spreadsheet, order of xyz() is not important, and you can
omit the terms which have a 0.

> 
> Does anyone here have the knowledge & skill to parse, expand and simplify
> polynomial expressions?
> Can you provide a reference to an explanation / code?
> 
> It would be great to have a native (SDL or source code) polynomial 'processor' -
> you know - in v 4.0  ;D
> 

Wolfram is your friend. Really.

> https://www.wolframalpha.com/input/web-apps/algebra-course-assistant/

to get the polynomial factor, "expand <equation>" is the solution.

Transcription of the result is rather simple, but that's my opinion.
Remember, order is irrelevant in the simplified form.

> 
> 
> It may take me a while to get my spreadsheet worked out and polished up a bit,
> but if I'm reminded (prodded) I can post it here (probably as a zip).
> 
> 
>


Post a reply to this message

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