Vincenzo De Florio en Engineers and Technicians, 3d Graphics, Mathematics Geo-ICT engineer • VITO (Vlaamse Instelling voor Technologisch Onderzoek) 30/5/2018 · 1 min de lectura · +500

Permutation numbers with FeedPovRay

Say you have the following string: "001122"

This is a string, but you can also think it as a ternary number.

Now break the number in three equal parts: "00", "11", "22".

Interpret each part as a ternary number: (0, 4, 8)

Interpret that tuple as a 3D coordinate: P

Plot at P a unit cube, or unit circle, or unit whatever

Repeat for the permutation that follows "001122", up to and including "221100"

Specify light sources, place an observer, specify materials etc etc with PovRay syntax

All the above is done as follows:

./feedpovray --input=001122 --y=2 --z=4 --output=001122.pov --prologue=01.prologue \

 --pigment="pigment { checker color Yellow color MidnightBlue } normal { bumps 0.4 scale 0.2 } finish { phong 1 }"

Now execute PovRay and render 001122.pov

If you want to try it yourself, get Feedpovray from here.

More information: Vincenzo De Florio (2005), "Permutation Numbers", Complex Systems Vol. 15, Issue 2, Complex Systems Publication, Inc. ISSN 0891-2513. Freely available here.

Permutation numbers with FeedPovRay

A little information about PovRay from wikipedia: "The Persistence of Vision Ray Tracer, or POV-Ray, is a ray tracing program which generates images from a text-based scene description, and is available for a variety of computer platforms. [...]  POV-Ray is free and open-source software with the source code available under the AGPLv3. [...] The 3.7 versions with SMP support are officially supported for Windows and Linux. Unofficial Macintosh versions for v3.7 can be found. "