Difference between revisions of "RENDER 3D EXAMPLES"

From ZCubes Wiki
Jump to navigation Jump to search
 
(24 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
[[More_RENDER_Examples| <<Additional Examples ]]
 
[[More_RENDER_Examples| <<Additional Examples ]]
  
[[RENDER_3D_EXAMPLES| <<RENDER 3D EXAMPLES]]
+
[[Users/Swapna | << User's Wiki page: Swapna]]
  
 
[[ Z3 | <<  Z3 home ]]
 
[[ Z3 | <<  Z3 home ]]
Line 13: Line 13:
  
  
=Dini's surface=
+
==Dini's surface==
 
<syntaxhighlight lang="javascript">
 
<syntaxhighlight lang="javascript">
 
RENDER3D(
 
RENDER3D(
Line 43: Line 43:
  
  
=Cone=
+
==Cone==
 
<syntaxhighlight lang="javascript">
 
<syntaxhighlight lang="javascript">
  
 
RENDER3D(
 
RENDER3D(
 
[
 
[
["type" ,"fill"],
+
["type","fill","material"],
["cone", "red"]
+
["cone", "red","normal"]
 
]
 
]
 
)
 
)
Line 55: Line 55:
  
 
</syntaxhighlight>
 
</syntaxhighlight>
[[File: Dinis_surface.png]]
+
[[File: cone_3d.png]]
  
=6-sided-cone=
+
==6-sided-cone==
 
<syntaxhighlight lang="javascript">
 
<syntaxhighlight lang="javascript">
  
Line 71: Line 71:
  
 
</syntaxhighlight>
 
</syntaxhighlight>
[[File: 6_sided_cone.png]]
+
[[File: 6-sided-cone.png]]
  
=octahedron=
+
==octahedron==
 
<syntaxhighlight lang="javascript">
 
<syntaxhighlight lang="javascript">
  
Line 84: Line 84:
 
""
 
""
 
</syntaxhighlight>
 
</syntaxhighlight>
[[File: Dinis_surface.png]]
+
[[File: octahedron.png]]
  
=Extruder=
+
==Extruder==
 
<syntaxhighlight lang="javascript">
 
<syntaxhighlight lang="javascript">
  
Line 104: Line 104:
 
[[File: extrude_1.png]]
 
[[File: extrude_1.png]]
  
=Sheet=
+
==Sheet==
 
<syntaxhighlight lang="javascript">
 
<syntaxhighlight lang="javascript">
  
Line 131: Line 131:
 
[[File: sheet_1.png]]
 
[[File: sheet_1.png]]
  
 +
 +
==Trefoil Knot==
 +
<syntaxhighlight lang="javascript">
 +
 +
RENDER3D(
 +
[
 +
["type" , "settings" , "size" , "stroke" , "fill", "helper", "material"],
 +
 +
["knot" ,"trefoil", [30,5,5] , ["yellow","green","red"] , "none" ,false , "normal"]
 +
]
 +
);
 +
""
 +
</syntaxhighlight>
 +
[[File: trefoil_knot.png]]
 +
 +
==Helical cubes==
 +
<syntaxhighlight lang="javascript">
 +
 +
pts=HELICALPOINTS(20,10);
 +
RENDER3D(
 +
[
 +
["type" ,"fill", "size", "coordinates","material","lookat","count"],
 +
["cube", "random",[[12,5,10]], pts, "phong",pts.rayslookat()  ,pts.length ]
 +
]
 +
)
 +
""
 +
 +
</syntaxhighlight>
 +
[[File: helical_cubes.png]]
 +
 +
==Torus ring==
 +
<syntaxhighlight lang="javascript">
 +
 +
pts=HELICALPOINTS(20,25,20,0);
 +
angles=deg360by20;
 +
RENDER3D(
 +
[
 +
["type" ,"fill", "size", "coordinates","material","lookat","count","rotation"],
 +
["torus", "random",[[10,5,5]], pts, "phong",pts.rayslookat()  ,pts.length,i=>[0,angles[i],0] ]
 +
]
 +
)
 +
""
 +
</syntaxhighlight>
 +
[[File: torus_ring.png]]
 +
 +
 +
==Heart curve==
 +
<syntaxhighlight lang="javascript">
 +
 +
pts=HELICALPOINTS(30,25,30,0);
 +
angles=deg360by30;
 +
RENDER3D(
 +
[
 +
["type" ,"settings","fill", "size", "coordinates","material","lookat","count","rotation"],
 +
["knot", "HeartCurve", "random",[[10,10,10]], pts, "phong",pts.rayslookat()  ,pts.length,i=>[0,angles[i],0] ]
 +
]
 +
)
 +
""
 +
</syntaxhighlight>
 +
[[File: heart_curve.png]]
  
  
 +
==Helicalpoints and Trefoil Knot==
 +
<syntaxhighlight lang="javascript">
  
 +
pts=HELICALPOINTS(30,25,30,0);
 +
angles=deg360by30;
 +
RENDER3D(
 +
[
 +
["type" ,"settings","size","stroke",  "coordinates","material","lookat","count","rotation"],
 +
["knot", "trefoil",[[30,5,5]], ["yellow","green","red"], pts, "normal",pts.rayslookat()  ,pts.length,i=>[0,angles[i],0] ]
 +
]
 +
)
 +
""
 +
</syntaxhighlight>
 +
[[File: trefoil_knot_1.png]]
  
 +
==Helicalpoints and VivianiCurve==
 +
<syntaxhighlight lang="javascript">
  
 +
pts=HELICALPOINTS(30,100);
 +
angles=deg360by10;
 +
RENDER3D(
 +
[
 +
["type" ,"settings","size","stroke","coordinates","material","lookat","count","rotation"],
 +
["knot", "VivianiCurve",[[30,2,5]], "green",pts, "normal",pts.rayslookat()  ,pts.length,i=>[0,angles[i],0] ]
 +
]
 +
)
 +
""
  
 +
</syntaxhighlight>
 +
[[File: Helicalpoints_vivianicurve.png]]
  
 +
==Helicalpoints and Helixcurve knot==
 +
<syntaxhighlight lang="javascript">
  
 +
pts=HELICALPOINTS(30,100);
 +
angles=deg360by10;
 +
RENDER3D(
 +
[
 +
["type" ,"settings","size","stroke","coordinates","material","lookat","count","rotation"],
 +
["knot", "HelixCurve",[[30,2,5]], "green",pts, "normal",pts.rayslookat()  ,pts.length,i=>[0,angles[i],0] ]
 +
]
 +
)
 +
""
  
 +
</syntaxhighlight>
 +
[[File: knot-helixCurve.png]]
  
 +
==Helical Points and torus knot==
 +
<syntaxhighlight lang="javascript">
  
 +
pts=HELICALPOINTS(30,25,20,0);
 +
angles=deg360by10;
 +
RENDER3D(
 +
[
 +
["type" ,"settings","fill", "size", "coordinates","material","lookat","count","rotation"],
 +
["knot","torus", "random",[[50,2,2]], pts, "normal",pts.rayslookat()  ,pts.length,i=>[0,angles[i],0] ]
 +
]
 +
)
 +
""
  
 +
</syntaxhighlight>
 +
[[File: knot-torus.png]]
  
 +
==Moving Decorated Torus Knot==
 +
<syntaxhighlight lang="javascript">
  
 +
RENDER3D(
 +
[
 +
["type" , "settings" , "coordinates", "size" , "stroke" , "fill", "helper", "material", "animation" ],
 +
["knot" , "DecoratedTorusKnot4a" , [10,1,1] ,[10,10,10] , 0x00ff00 , "yellow" ,false , "normal",
 +
[
 +
["opm" ,"r" ],
 +
[10 ,10  ]
 +
]
 +
]
 +
 +
]
 +
);""
  
 +
</syntaxhighlight>
 +
[[File: knot-decoratedtorus4a.png]]
  
  
Line 152: Line 280:
 
[[More_RENDER_Examples| <<Additional Examples ]]
 
[[More_RENDER_Examples| <<Additional Examples ]]
  
[[RENDER_3D_EXAMPLES| <<RENDER 3D EXAMPLES]]
+
[[Users/Swapna| << User's Wiki page: Swapna]]
  
 
[[ Z3 | <<  Z3 home ]]
 
[[ Z3 | <<  Z3 home ]]

Latest revision as of 10:58, 8 March 2022

<<RENDER MAIN PAGE

<<Additional Examples

<< User's Wiki page: Swapna

<< Z3 home


ZCubes RENDER 3D Examples

ZCubes RENDER 3D feature allows users to make fascinatingly complex drawings and animations by simply using the spreadsheet, array or table features. Various editing options (such as environment, material, camera etc.) allow the user to view the created drawing in different angles and effects.


Dini's surface

RENDER3D(
	[
		["type"		,	"settings"	,	"coordinates", "size"	, "stroke"	, "fill", "helper", "material"	],
		["parametricgeometry"		,	
				function mf(u,v,target)
				{
					var a=1;
					var b=0.2;
					u=u*4*(Math.PI)
					v=v*2; 
					
					
					x	=	a*COS(u)*SIN(v)	
					y	=	a*SIN(u)*SIN(v)
					z	=	MIN(MAX(a*(COS(v)+LN(TAN(1/2*v)))+b*u,-100),100);
					
					target.set(x,y,z);
				}

		,	[1,3,3]		,[5,5,50,50]		, 0x00ff00		, "zrange" ,false	, "phong"]
	]
);
""

Dinis surface.png


Cone

RENDER3D(
	[
		["type","fill","material"],
		["cone", "red","normal"]
	]
)
""

Cone 3d.png

6-sided-cone

RENDER3D(
	[
		["type"		,"fill", "size","material"],
		["cone", "red",[5,10,6],"normal"]
	]
);
""

//radius-5, height-10, sides-6

6-sided-cone.png

octahedron

RENDER3D(
	[
		["type"		,"fill", "size"],
		["octahedron", "red",]
	]
);
""

Octahedron.png

Extruder

RENDER3D(
	[
		["type"		,	"settings"	,	"coordinates", "size"	, "stroke"	, "fill", "helper", "material","extrude"	],
		["extruder"		,[[1,3,3],[2,3,3],[3,2,1]],		,[1,1,1]		, 0x00ff00		, "yellow" ,false	, "phong",
		[
			["extrudePath"],
			[[[1,2,0],[2,2,2],[3,3,0]]]
		]
		]
	]
);
""

Extrude 1.png

Sheet

RENDER3D(
	[
		["type"		,	"settings"	,	"coordinates", "size"	, "stroke"	, "fill", "helper", "material"	],
		["parametricgeometry"		,	
				function mf(u,v,target)
				{
					a=4;
					b=1;
					
					var x=cos(v)*((cos(u)/4)+1)
					var y=sin(v)*((cos(u)/4)+1)
					var z=sin(u)/4
					target.set(x,y,z);
					
				}

		,	[1,3,3]		,[5,5,20,20]		, 0x00ff00		, "yellow" ,false	, "normal"]
	]
);
""

Sheet 1.png


Trefoil Knot

RENDER3D(
	[
		["type"		,	"settings"	, "size"	, "stroke"	, "fill", "helper", "material"],
		
		["knot"		,"trefoil",	[30,5,5]	, ["yellow","green","red"]		, "none" ,false	, "normal"]
	]
);
""

Trefoil knot.png

Helical cubes

pts=HELICALPOINTS(20,10);
RENDER3D(
	[
		["type"	,"fill", "size", "coordinates","material","lookat","count"],
		["cube", "random",[[12,5,10]],	pts,	"phong",pts.rayslookat()  ,pts.length	]
	]
)
""

Helical cubes.png

Torus ring

pts=HELICALPOINTS(20,25,20,0);
angles=deg360by20;
RENDER3D(
	[
		["type"	,"fill", "size", "coordinates","material","lookat","count","rotation"],
		["torus", "random",[[10,5,5]],	pts,	"phong",pts.rayslookat()  ,pts.length,i=>[0,angles[i],0]	]
	]
)
""

Torus ring.png


Heart curve

pts=HELICALPOINTS(30,25,30,0);
angles=deg360by30;
RENDER3D(
	[
		["type"	,"settings","fill", "size", "coordinates","material","lookat","count","rotation"],
		["knot", "HeartCurve", "random",[[10,10,10]],	pts,	"phong",pts.rayslookat()  ,pts.length,i=>[0,angles[i],0]	]
	]
)
""

Heart curve.png


Helicalpoints and Trefoil Knot

pts=HELICALPOINTS(30,25,30,0);
angles=deg360by30;
RENDER3D(
	[
		["type"	,"settings","size","stroke",  "coordinates","material","lookat","count","rotation"],
		["knot", "trefoil",[[30,5,5]], ["yellow","green","red"],	pts,	"normal",pts.rayslookat()  ,pts.length,i=>[0,angles[i],0]	]
	]
)
""

Trefoil knot 1.png

Helicalpoints and VivianiCurve

pts=HELICALPOINTS(30,100);
angles=deg360by10;
RENDER3D(
	[
		["type"	,"settings","size","stroke","coordinates","material","lookat","count","rotation"],
		["knot", "VivianiCurve",[[30,2,5]], "green",pts,	"normal",pts.rayslookat()  ,pts.length,i=>[0,angles[i],0]	]
	]
)
""

Helicalpoints vivianicurve.png

Helicalpoints and Helixcurve knot

pts=HELICALPOINTS(30,100);
angles=deg360by10;
RENDER3D(
	[
		["type"	,"settings","size","stroke","coordinates","material","lookat","count","rotation"],
		["knot", "HelixCurve",[[30,2,5]], "green",pts,	"normal",pts.rayslookat()  ,pts.length,i=>[0,angles[i],0]	]
	]
)
""

Knot-helixCurve.png

Helical Points and torus knot

pts=HELICALPOINTS(30,25,20,0);
angles=deg360by10;
RENDER3D(
	[
		["type"	,"settings","fill", "size", "coordinates","material","lookat","count","rotation"],
		["knot","torus", "random",[[50,2,2]],	pts,	"normal",pts.rayslookat()  ,pts.length,i=>[0,angles[i],0]	]
	]
)
""

Knot-torus.png

Moving Decorated Torus Knot

RENDER3D(
	[
		["type"		,	"settings"	,	"coordinates", "size"	, "stroke"	, "fill", "helper", "material", "animation"	],
		["knot"		,	"DecoratedTorusKnot4a"		,	[10,1,1]		,[10,10,10]		, 0x00ff00		, "yellow" ,false	, "normal", 
			[
				["opm"	,"r" ],
				[10		,10  ]
			]
		]
		
	]
);""

Knot-decoratedtorus4a.png


<<RENDER MAIN PAGE

<<Additional Examples

<< User's Wiki page: Swapna

<< Z3 home