Difference between revisions of "Documentation Talk:Tutorial Section 3.2"
Jump to navigation
Jump to search
Le Forgeron (talk | contribs) (Corrections of poly text and proposal for new subsection in poly (as last part)) |
Jholsenback (talk | contribs) m (follow up) |
||
Line 4: | Line 4: | ||
* Hereafter a suggestion for an additional section in poly, about the new syntax | * Hereafter a suggestion for an additional section in poly, about the new syntax | ||
--[[User:Le Forgeron|Le Forgeron]] 08:23, 22 January 2011 (UTC) | --[[User:Le Forgeron|Le Forgeron]] 08:23, 22 January 2011 (UTC) | ||
+ | : It's been done. I also added a link in the reference section (where the new syntax is mentioned) to this additional content --[[User:Jholsenback|jholsenback]] 13:53, 22 January 2011 (UTC) | ||
---- | ---- | ||
=====Polynomial made easy===== | =====Polynomial made easy===== |
Revision as of 13:53, 22 January 2011
Updates to perform (sorry, cannot provide it as wiki text):
- in Poly object, Creating the polynomial function : the second formula of the sphere should be changed (it's a picture) to : x²+y²+z²-r² = 0 (the square on r is missing, it will confuse the math-geeks from the first formula) (the picture/formula is reused in the next section: writing the polynomial vector)
- The note in Creating the polynomial function talk about a limit of 7th order, it should be updated to 35 now.
- Hereafter a suggestion for an additional section in poly, about the new syntax
--Le Forgeron 08:23, 22 January 2011 (UTC)
- It's been done. I also added a link in the reference section (where the new syntax is mentioned) to this additional content --jholsenback 13:53, 22 January 2011 (UTC)
Polynomial made easy
Consulting the table in the chapter Poly, Cubic and Quartic or writing a program to get the right poly vector can be a bit cumbersome on the long run (especially when the poly vector is not a write-once-only expression and that you want to get it back).
1) The previous sphere can also be:
#declare Radius=1; polynomial { 2, xyz(2,0,0):1, xyz(0,2,0):1, xyz(0,0,2):1, xyz(0,0,0):-Radius*Radius }
2) Let's now see the second one:
polynomial { 5, xyz(2,0,1):1, xyz(0,4,1):1, xyz(1,2,0):-2 }
3) And finally the torus:
polynomial { 4, xyz(4,0,0):1, xyz(2,2,0):2, xyz(2,0,2):2, xyz(2,0,0):-2*(r1*r1+r2*r2), xyz(0,4,0):1, xyz(0,2,2):2, xyz(0,2,0):2*(r1*r1-r2*r2), xyz(0,0,4):1, xyz(0,0,2):-2*(r1*r1+r2*r2), xyz(0,0,0):pow((r1*r1-r2*r2),2) }