Logo by S Nelson - 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: Visit us on facebook
 
*
Welcome, Guest. Please login or register. April 19, 2024, 01:27:30 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: Turbo Squid - with javascript and Structure Synth parameters  (Read 1071 times)
0 Members and 1 Guest are viewing this topic.
barcud
Navigator
*****
Posts: 69


« on: April 16, 2016, 09:52:13 PM »

One of the first tries to bring the java-script together with direct Structure Synth generated parts.

Javascript:
Code:
#javascript

Builder.load("sinwaveSculpture5turbine_es.es");
max =480;
z_height=2

Builder.append("rule sinwave{")
for (i = 0; i <=  max; i+=1) {
trig_val=i*2.8/max
sin_x=48*i/max
sin_y=8*Math.sin(trig_val)-Math.sin(trig_val)
rot_z=88*Math.cos(trig_val)
sin_updown=Math.sin(trig_val*2)
wsx="{ y "+ sin_y + " x " +sin_x +" rz "+ rot_z +" ry "+ (70-sin_updown*260) +" rz "+ 80*sin_updown +" y -3 s 0.2 "+ (4.2+sin_updown*4) +" "+ (1.5+sin_updown*1.3)+" color red b 0.5 sat 0.8 h "+ (100+sin_updown*79)+"} box"
Builder.append(wsx)
}

Builder.append("}")
Builder.build();

EisenScript (save as sinwaveSculpture5turbine_es.es):
Code:
mysin

rule mysin md 6{
{rx 0} sinwave
{rx 60} mysin
}

{x 45 z 3 y -1 s 1.5  rz -90 color orange b 0.8 sat 0.8} thrusters


rule thrusters{
1 * {rx 0  s 0.2 2.6 0.2}TRing
}

rule TRing  md 32
{
{ ry 5.625  rx 33 }TRingPart  // different rx produce nice results
2 * {rz 180 y -1} 1 * { ry 5.625  rx -14}TurbineCone
{ ry 11.25 rx 0 x 1.7 } TRing
}

rule TRingPart{
{ b 0.25 y -1.5 rx -90 }troof       // with that you get a roof structure
{ b 0.4 a 0.5 y 1.0 s 2.0 1 0.1 } box
{ b 0.4 a 0.5 z 2 y 1.0 s 2.4 1 0.1 } box
{ s 2.4 0.1 2.25 y 4 z 0.44 }box  // white tiles outward
{z -2  y -0.6 s 12 0.1 5 }box  // turbo fan inside out
}

rule troof{
{ z 4 } panel
{ z 3 s 0.8 0.1 1.75 } box
{ y -1.9 z 3 s 0.1 0.1 1.925 } box
}

rule panel{
{ s 2.2 0.1 0.125 } box  //bottom ones
{ y -1 s 0.2 2 0.1  } box  // vertical ones
{ y -1.925 s 2.3 0.1 0.25} box  //top ones
}

rule turbineCone{
{ s 1 0.1 5.5 y 12 z -1 }box
}


* sinwaveSculpture5turbine2.jpg (210.9 KB, 1735x850 - viewed 422 times.)
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Structure Synth General Discussion seied 11 3790 Last post October 21, 2012, 11:02:36 PM
by blob
Structure Synth 3D Fractal Generation VanlindtMarc 2 4996 Last post July 11, 2013, 10:59:34 PM
by VanlindtMarc
Flower (Structure Synth parameters included) Images Showcase (Rate My Fractal) VanlindtMarc 1 2212 Last post July 28, 2013, 02:55:37 PM
by cKleinhuis
The Strange Truc-Bidule ( parameters for Structure Synth included ) Images Showcase (Rate My Fractal) VanlindtMarc 0 1698 Last post July 28, 2013, 07:04:04 PM
by VanlindtMarc
Still using structure synth for houses Structure Synth Gallery barcud 5 1961 Last post April 06, 2016, 11:26:59 PM
by matsoljare

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.175 seconds with 29 queries. (Pretty URLs adds 0.009s, 2q)