Logo by CorneliaYoder - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Follow us on Twitter
 
*
Welcome, Guest. Please login or register. October 02, 2018, 12:41:29 PM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Cube out of triangle pyramids with parameters and tips  (Read 247 times)
0 Members and 1 Guest are viewing this topic.
barcud
Navigator
*****
Posts: 69


« on: February 15, 2016, 09:41:59 PM »

Triangles are quite underused in Structure synth
They also have a slight problem - depending which way around you define them (corner A->B->C or C->B->A) they are only visible from one side in the openGL preview. The render later on is fine but it gets a bit difficult to see what you are doing.

So what I generally do is
-generate the triangle(s) I want
-use a mirror function (and possibly shift) to create a triangle you can see from both sides
-if it matters you can then - when rendering - half the number of objects by removing the mirrored side

So here a cube made out of triangle pyramids of different heights

Code:
set colorpool image:colori.png 
// creates the 4 sides
4 * {rz 90 x -13} 6 * { z 2} 6 * {x 2} tri3
// and the other two
1 * { rx -90  z -13} 6 * { z 2} 6 * {x 2} tri3
1 * { z 13 rx 90 } 6 * { z 2} 6 * {x 2} tri3

rule tri3{
1 * { y 0.1 s 1 1.2 1} tri2
}
rule tri3{
1 * {y -1  s 1 -1 1}tri2
}
rule tri3{
1 * { y -0.1 s 1 0.8 1}tri2
}
rule tri3{
1 * { y -0.2 s 1 0.6 1}tri2
}

rule tri2{
4 * {ry 90 x 1 color random } triangle[1,0,1;0,1,0;-1,0,1]
}



* TrianglePyramidCube2.jpg (188.06 KB, 936x900 - viewed 81 times.)
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
My Mandelbulb needs Tips Mandelbulb Implementation zee 13 3429 Last post January 19, 2010, 02:32:08 AM
by cKleinhuis
Pyramids Mandelbulb3D Gallery Lee Oliver 0 234 Last post January 20, 2011, 12:47:32 PM
by Lee Oliver
Sierpinski Pyramids Mandelbulb3D Gallery mario837 0 277 Last post February 05, 2011, 02:31:00 PM
by mario837
Tips for creating fractals? Mandelbulb 3d tin34543 3 884 Last post February 05, 2012, 05:00:34 PM
by tin34543
Flat earth pyramids of xamari spacefarers Images Showcase (Rate My Fractal) Alef 2 404 Last post August 03, 2017, 05:18:51 AM
by 1Bryan1

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.129 seconds with 28 queries. (Pretty URLs adds 0.009s, 2q)