Octave graphic add-on, Octaviz



česky

2.2 Pyramid, pyramid2(n-sides), frustum_pyramid



Function file: pyramid(m,n,p,a,b,v,prop,val)


This function plots 4-side pyramid. Definition:
  • 1 pyramid - left down corner in [m,n,p] and lengths "a","b","v"; all values are scalar
  • n-pyramids - left down corners in [m,n,p] a lengths "a","b","v"; all values are vectors

Parameters of function:
Parameter m,n,p describe left bottom corner of the pyramid in axes x,y,z.
Parameter a,b,v describe lengths of the pyramid - height, width, high.
Parameters prop, val are using for change color or opacity. These parameters are optional.


Example:
pyramid([0,2],[0,3.2],[0,-1.2],[2,3],[3,2],[4,5],["c","o"],[[1 0.5 0.5],0.5]);





Function file: pyramid2(m,n,p,n_number,r,v,prop,val)


This function plots regular n-side pyramid. Definition:
  • 1 pyramid - left bottom corner in [m,n,p] and lengths "a","b","v"; all values are scalar
  • n-pzramids - left bottom corners in [m,n,p] a lengths "a","b","v"; all values are vectors

Parameters of function:
Parameter m,n,p describe left bottom corner of the pyramid in axes x,y,z.
Parameter n_number describe number of sides.
Parameter r,v describe radius of n-square (r) and high of the pyramid (v).
Parameters prop, val are using for change color or opacity. These parameters are optional.


Example:
pyramid2([0,2],[0,3.2],[0,-1.2],[5,6],[3,2],[4,5],["c","o"],[[1 0.5 0.5],0.1]);



download m-file



Function file: frustum_pyramid(m,n,p,a1,b1,a2,b2,v,prop,val)


This function plots 4-sides frustum pyramid. Definition:
  • 1 frustum pyramid - left bottom corner in [m,n,p] and lengths "a1","b1","a2","b2","v"; all values are scalar
  • n- frustum pyramids - left bottom corners in [m,n,p] and lengths "a1","b1","a2","b2","v"; all values are vectors

Parameters:
Parameters m,n,p describe left bottom corner of the frustum pyramid in axea x,y,z.
Parameters a1,b1 describe length of sides of base of the frustum pyramid - height, width.
Parameters a2,b2 describe length of sides of upper base of the frustum pyramid - height, width.
Parameter v describe high of frustim pyramid.
Parameters prop, val are using for change color or opacity. These parameters are optional.


Example:
frustum_pyramid([0,2],[0,3.2],[0,-1.2],[5,6],[4,4],[3,2],[2,1],[7,6],["c","o"],[[1 0.5 0.5],0.1]);







<<< 2.1 Cube, block, cuboid 2.3 Cylinder, sphere >>>

© 2008 David Prokop