Difference between revisions of "Users/Manu"

From ZCubes Wiki
Jump to navigation Jump to search
(Created page with " << Z3 home =ZCubes Render Examples= ZCubes Render feature allows users to make fascinatingly complex drawings and animations by simply using the spreadsheet, ar...")
 
Line 6: Line 6:
 
ZCubes Render feature allows users to make fascinatingly complex drawings and animations by simply using the spreadsheet, array or table features.  
 
ZCubes Render feature allows users to make fascinatingly complex drawings and animations by simply using the spreadsheet, array or table features.  
  
==Example 1: Two Circles==
+
=Example 1: Youtube Icon=
  
Draw two circles with radii as given.
+
<pre>
  
<pre>
 
 
RENDER(
 
RENDER(
  [
+
[
      ["type","size"],
+
    ["type","x","y","rx","ry","width","height","points","fill",
      ["circle",100],
+
"stroke","stroke-width"],
      ["circle",200]
+
  ]
+
    ["rect",5,10,15,15,70,50,,"red","red",5],
)
+
 +
    ["polygon",,,,,,,[27 ,25, 50, 37, 27, 45],"white","white",2]
 +
 
 +
]);
 +
""
 +
 
 
</pre>
 
</pre>
  
[[File:Two_Circles.png]]
+
[[File:Render_Youtube_Icon.png]]
  
==Example 2: Ten Circles==
 
  
Draw ten circles with radii as per the function given. Note that each ith circle will have the radius as given by the function. Note the use of count column to specify the number of circles to be generated.
+
=Example 2:Emoji Smiley Face=
  
 
<pre>
 
<pre>
 +
 
RENDER(
 
RENDER(
 
   [
 
   [
      ["type","size","count"],
+
    ["type","x","y","coordinates","fill","cx","cy","r","stroke","stroke-width"],
      ["circle",(i)=>100+i*10,10]
+
  ["circle",,,,"yellow",200,150,40,"Yellow",20],
  ]
+
  ["circle",,,,"black",180,140,10,"white",5],
)
+
  ["circle",,,,"black",220,140,10,"white",5],
 +
  ["path",,, "M 180 165 C 190 185, 210 185, 220 165","transparent",,,,"black",5],
 +
 +
  ])
 
""
 
""
 +
 
</pre>
 
</pre>
  
[[File:Render_Ten_Circles.png]]
+
[[File:Render_Emoji_Smiley_face.png]]
  
==Example 3: American Flag==
 
  
Generating American Flag using RENDER feature.
+
=Example 3:Emoji Sad Face=
 +
 
 
<pre>
 
<pre>
// american flag 4 final
+
 
RENDER(
+
RENDER(
 
   [
 
   [
      ["type","x","y",     "width","height","fill",           "count","shape","id","href","sides","size"],
+
    ["type","x","y","coordinates","fill","cx","cy","r","stroke","stroke-width"],
      ["rect",10,(i)=>i*20,   400,   20,   (i)=>(i%2)?"white":"red"  ,13,,,,,],
+
  ["circle",,,,"yellow",195,170,40,"Yellow",20],
      ["rect",10,   0,         200,   140,  "blue"                 ,1,,,,,],
+
  ["circle",,,,"black",175,160,10,"white",5],
      ["star",50,  0,         200,   140,   "white"                 ,1,true,"star11","","12",10],
+
  ["circle",,,,"black",215,160,10,"white",5],
      ["use",(i)=>((i)%6)*30+30,  (i)=>((i).intdiv(6))*25+15,        300,  140,  "white"                 ,6*5,false,"","star11","",300],
+
  ["path",,, "M 175 200 C 185 185, 200 180, 215 200","transparent",,,,"black",5],
      ["use",(i)=>((i)%5)*30+20+25,  (i)=>((i).intdiv(5))*25+20+10,         300,   140,   "white"                 ,4*5,false,"","star11","",300]
+
 
  ]
+
  ])
)        
 
 
""
 
""
 +
 
</pre>
 
</pre>
[[File:Render_American_Flag.png]]
 
  
==Example 4: Indian Flag==
+
[[File:Render_Emoji_Sad_face.png]]
 +
 
 +
=Example 4:Golden Star=
  
Generating Indian Flag using RENDER feature.
 
 
<pre>
 
<pre>
  
RENDER(
+
RENDER( [  
  [
+
["type","points","stroke","stroke-width","fill"],
      ["type","x","y",      "width","height","fill",            "count","shape","id","href","sides","size","cx","cy","r","stroke","stroke-width","points","transform"],
+
        ["polygon",[100,10 40,198 190,78 10,78 160,198],"gold",5,["gold"]],
      ["rect",10,(i)=>i*90,  400,  90,    ["orange","white","green"]  ,3,,,,,,],
+
] )
      ["circle",,,,,      ,1,,,,,,200,135,40,"blue",5,],
 
      ["circle",,,,,      ,1,,,,,,200,135,5,"blue",10,],
 
      ["polyline",,,,,  "blue"  ,24,,,,,,,,,"blue",1,i=>[200,135,199,120, 200,95,201,120,200,135],(i=>({"rotation":(i+1)/24*360,"cx":200,"cy":135})) ],
 
  ]
 
);
 
 
""
 
""
 +
 
</pre>
 
</pre>
  
[[File:Render_Indian_Flag.png]]
+
[[File:Render_Golden_Star.png]]
  
 
=Additional Examples WIP=
 
=Additional Examples WIP=

Revision as of 04:49, 23 November 2020

<< Z3 home


ZCubes Render Examples

ZCubes Render feature allows users to make fascinatingly complex drawings and animations by simply using the spreadsheet, array or table features.

Example 1: Youtube Icon


RENDER(
	[
	    ["type","x","y","rx","ry","width","height","points","fill",
						"stroke","stroke-width"],
		
	    ["rect",5,10,15,15,70,50,,"red","red",5],
		
	    ["polygon",,,,,,,[27 ,25, 50, 37, 27, 45],"white","white",2]

]);
""

Render Youtube Icon.png


Example 2:Emoji Smiley Face


RENDER(
   [
   	  ["type","x","y","coordinates","fill","cx","cy","r","stroke","stroke-width"],
	  ["circle",,,,"yellow",200,150,40,"Yellow",20],
	  ["circle",,,,"black",180,140,10,"white",5],
	  ["circle",,,,"black",220,140,10,"white",5],
	  ["path",,, "M 180 165 C 190 185, 210 185, 220 165","transparent",,,,"black",5],
	
	   ])
""

Render Emoji Smiley face.png


Example 3:Emoji Sad Face


 RENDER(
   [
   	  ["type","x","y","coordinates","fill","cx","cy","r","stroke","stroke-width"],
	  ["circle",,,,"yellow",195,170,40,"Yellow",20],
	  ["circle",,,,"black",175,160,10,"white",5],
	  ["circle",,,,"black",215,160,10,"white",5],
	  ["path",,, "M 175 200 C 185 185, 200 180, 215 200","transparent",,,,"black",5],

	   ])
""

Render Emoji Sad face.png

Example 4:Golden Star


 RENDER( [ 
		["type","points","stroke","stroke-width","fill"],
	        ["polygon",[100,10 40,198 190,78 10,78 160,198],"gold",5,["gold"]],
	] )
""

Render Golden Star.png

Additional Examples WIP

Various RENDER Examples

<< Z3 home