Polynomial Equations in CGI Software
Soooooo......I have been seeing a lot of awesome creations in the VFX community in regards to visualizing equations and mathematical shapes. So thank you all for the wonderful inspiration, and now here is a quick breakdown as to what a polynomial is, as well as some further content to explain how their equations and others are visualized.
What is a Polynomial Shape?
Each shape in the universe is made up from an equation. Some are called polynomials. A polynomial is a monomial (an algebraic expression consisting of one sum or value) or sum of a bunch of different monomial values. Polynomials can be classified by their degree. The degree tells us about the general shape of the graph the polynomial lies on. As the degree increases above 1, the graph gets a set of points to show where the shape changes direction. These points of inflection give relative min or max values that we can use to calculate our polynomial.
A polynomial of degree is classified by the value; n. This is calculated by the function of the form f(x) = anx n + an−1x n−1 + . . . + a2x 2 + a1x + a0 where the a’s are real numbers (sometimes called the coefficients of the polynomial). These equations can sometimes go on forever.
Polynomials can be designed to produce specific shapes. Generating a particular shape requires knowing the specific polynomial's equation.
Systems of a Polynomial
A polynomial system is a set of simultaneous equations. They can contain f,x,k, and other variables to describe their numeric values. These equations are calculated in a "feild" of equations that are usually described by the letter k. When k is represented as the field of rational numbers, k is also assumed to represent all of the other complex numbers created from the other rational numbers. These complex numbers can also equal the sum values from your equations.
There are also shapes that are formed through trigonometric polynomials. These polynomials are calculated on trigonometric equations. They combine the sines and cosines of the polynomial by using sum and difference formulas.
There are some general numerical algorithms used to help explain how sets of polynomial equations can be equal to a set of values. These can also work for solving nonlinear equations. Here are two:
Newton's method: This method can be used if the number of equations is equal to the number of variables. Basically, if you have 5 equations and they all 5 similar variables, you can solve the feild of equations. This method is a good starting point, but It does not allow one to find all the solutions nor to prove that there is no solution.
Optimization: This is an older concept of solving. It is rarely used for solving polynomial systems, but more for nonlinear equations.This method minimizes the sum of the squares of the equations. If zero is found as a local minimum value, then that is the solution to the equations. However, it doesn't work well for positive equations.
Spirographs, Hypotrochoids and Epicycles
I also wanted to add a different section to this article. There are many complex shapes, and as well as some more interesting ones I wanted to cover:
Where should we begin....
Basic geometric designs are built out of straight lines and circles. Spirographs, Epicycles, and Hypotrochoids are all built around this idea. These shapes are built from lines that are tracing overlapping shapes. By adding overlapping circles and their lines together, we can generate some interesting spiral patterns. You can see a great example of these shapes HERE. A cool thing about these shapes is that if add enough circles you can actually get any curve you want.
The circles involved in these shapes are sometimes called cogs. If we were plotting the curve between these two shapes we would need to consider that both these cogs are moving. As well take into considering the size and shape of them. You can generate a curve by calculating sizes of the two or more circles, and number of rotations the shapes do while they are spinning.
These curves have been used through out ancient history to help further understand how the planets in our solar system orbit around the stars. Epicycles were first given as a name to the paths the planets traveling across the sky. They were also called epitrochoids. This might not make sense as Epicycles are a set of overlapping traveling circles, but that was how their paths appeared when scientists such as Claudius Ptolemaeus first studied the sky. Back in ancient B.C.E, it was believed that the Earth was the center of the solar system, and everything else orbited around it. This theory was called the Geocentric model. Because of this faulty theory, the planets appeared to complete recursive and overlapping circles across the sky. Fortunately, Copernicus came along and proved that we are not at the center of our universe.
You can also consider Epicycles as the addition of different radii of circles and their speed mixed together.
A Spirograph is just a special case of an epicycle path, where the outer orbit perfectly matches up with the inner orbit’s rotation speed. They are the same, but Spirographs are more symmetrical. They also can be calculated a bit differently. They can be calculated with five different parameters. The inner radius, outer radius, spinner radius, revolutions, and iterations of it's circles.
A hypotrochoid is drawn when a small circle rolls on the inside of a large circle. Think of it as a rotating circle inside another circle. They are also another branch of an Epicycle.
VFX, Tutorials, and Other Helpful Creations
To wrap this article up, I wanted to talk about some software packages and tutorials that can make your life a bit easier when it comes to modeling polynomial shapes.
Root-finding is a program that is specifically designed for handling polynomial functions, and mathematical equations. It is created by the software developers Maplesoft. It can find the roots of numbers. This can be useful for showing how numbers and the corresponding sequences can be degraded.
Maplesoft also has several other programs that can expand upon calculating numbers. They also have a program called Regular Chains that contains various functions for solving polynomial systems. Others can complete rational expressions, algebra, differential equations, and much more. Just like Houdini their programs can handle fractals, L-systems, Mandelbrot, and any other shape that requires solving.
You can visit their website HERE.
Now onto some tutorials.... Here are a list of some that can help you on your mathematical journey.
Houdini Algorithmic Live - Gear-Shaped Polyhedron: https://www.youtube.com/watch?v=ldapHgLqAjg
Lissajous Bones: https://www.youtube.com/watch?v=cWuLyEWHjnM
Hyperbolic Tiling (Poincare disk tiling): https://www.youtube.com/watch?v=6z3rQb3fUMw&t=1s
Fourier Epicycles (Slow version): https://www.youtube.com/watch?v=0KBinPR2LSg
Deborah R. Fowler:
Modular Multiplication: https://www.youtube.com/watch?v=Nms9ntdA2Wo
David Kahl VFX:
The Superformula in Houdini: https://www.youtube.com/watch?v=TPJ0TnsQywY
Solving Systems of Polynomial Equations: https://math.berkeley.edu/~bernd/cbms.pdf
The PolSys Team - Computer Algebra and Polynomial Systems: https://www-polsys.lip6.fr/
Software for Polynomials: http://cgi.di.uoa.gr/~emiris/soft_alg.html
Modeling with Polynomial Functions: https://study.com/academy/lesson/modeling-with-polynomial-functions.html
Rendering 101 pt. 1: Theory – Raytracing, Pathtracing & Monte Carlo: https://entagma.com/rendering-101-pt-1-theory-raytracing-pathracting-monta-carlo/
Voronoi Morph: https://entagma.com/voronoi-morph/
Crochet – Blending between Delaunay and Voronoi: https://entagma.com/crochet-blending-between-delaunay-and-voronoi/
A Tribute To Numberphile: Visualizing Recamán’s Sequence in VEX: https://entagma.com/a-tribute-to-numberphile-visualizing-recamans-sequence-in-vex/
The Superformula in Houdini | VEX Quickies: https://www.youtube.com/watch?v=TPJ0TnsQywY
[Houdini Tutorial] 0050 Lissajous Bones: https://www.youtube.com/watch?v=cWuLyEWHjnM
Houdini Tutorial] 0048 Impossible Object (Penrose Circle): https://www.youtube.com/watch?v=JpQLovULcH4
Houdini Algorithmic Live #004 - Hilbert Curve: https://www.youtube.com/watch?v=KHocjnLUm5w
[Houdini Tutorial] 0042 Hyperbolic Tiling (Poincare disk tiling): https://www.youtube.com/watch?v=6z3rQb3fUMw
Epicycle in Ptolemaic Astronomy: Definition & Overview: https://study.com/academy/lesson/epicycle-in-ptolemaic-astronomy-definition-lesson-quiz.html#:~:text=An%20epicycle%20is%20an%20orbit,uniform%20motion%20of%20the%20planets.
Spirographs, Hypotrochoids, and Chaos: https://www.physicstomato.com/spirographs/
Epicycloids and Hypocycloids
Positive frequencies let the circle role outside: https://www.math.uni-bonn.de/people/karcher/VMMPlaneCurves/Curves/epi_hypocycloid/epicycles.html
SPIROGRAPHS AND THE THIRD DIMENSION: https://maxwelldemon.com/2010/01/14/spirographs-and-the-third-dimension/