drawing primatives with GNU Octave...

etienne at isr.ist.utl.pt etienne at isr.ist.utl.pt
Sun Feb 1 14:42:46 CST 2009


   Hi James,

may I point you to octave-forge? It has a vrml package that allows to  
generate vrml code and view it from octave. To view a cylinder  
parallel to the X axis, of diameter 0.5  and length 2, you can do e.g.
-------------------------------------------------------------------------

>> vrml_browse (vrml_cyl ([-1 1; 0 0; 0 0], "col",[1 0 0], "rad",0.5))

-------------------------------------------------------------------------
>> help vrml_cyl

       s = vrml_cyl(x,...)

Makes a cylinder that links x(:,1) to x(:,2)

Options :

"tran", transparency    : Transparency                  default = 0
"col" , col             : Color           default = [ 0.3 0.4 0.9 ]
"rad" , radius          : Radius of segments         default = 0.05
"balls"                 : Add balls to extremities
"brad"                  : Radius of balls             default = rad
"emit", bool            : Use or not emissiveColor
"noemit"                : Same as emit,0
"arrow"                 : Last segment is an arrow
"hcol", hcol            : Set color of the head of the arrow.
                                                       default = col
--------------------------------------------------------------------------
which may not be exactly what you  want but ...

   Hth,

   Etienne





Quoting James Moliere <jmoliere at ucsd.edu> (Sat, 31 Jan 2009 07:17:43 -0800):

> Hello,
> I'd like to draw 3D primitives with Octave such as cubes, cylinders,
> spheres, etc.  I don't want to enter equations for these, I'd prefer to
> use something like openGL commands such as
>
> drawCylinder(x, y, z, radius, length, slices);
>
> If this exists, please show me.  I don't want to use equations to draw
> these primitives.  If not, can anyone direct me on how to integrate a 3D
> library like OpenSceneGraph into Octave?  I would prefer something like
> a guide instead of source code.
>
> Thanks!
>
> _______________________________________________
> Help-octave mailing list
> Help-octave at octave.org
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>



-- 
http://www.isr.ist.utl.pt/~etienne

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



More information about the Help-octave mailing list