[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Drawing Polyhedra
From: |
etienne |
Subject: |
Re: Drawing Polyhedra |
Date: |
Wed, 31 Jan 2007 22:27:41 -0800 (PST) |
User-agent: |
SquirrelMail/1.4.4 |
Hi Troy,
the following code (taken from octave-forge's test_vrml_faces.m) displays
a tetrahedron, w/ the help of the VRML/X3D browser FreeWRL.
==============================================================
## Tetrahedron : Vertices
x = [ 1 1 -1 0;
-1 1 0 0;
-1 -1 -1 1];
## Tetrahedron : Faces
trg = [1 2 3 1;
2 3 1 2;
4 4 4 3];
s1 = vrml_faces (x, trg);
vrml_browse (s1);
===============================================================
To run it, you need Octave (2.9.9 for me), Octave-Forge (CVS, probably)
and FreeWRL.
To display your tetrahedron w/ lines or points, use vrml_lines() (or
vrml_cyl()) or vrml_points(). Some familiarity w/ VRML is handy when
using these functions.
Hth,
Etienne
On Wed, January 31, 2007 1:50 pm, Roy Thistle said:
> Hi:
> I just want to draw a tetrahedron by inputing the veticies, and displaying
> them on a 3-D graph (right handed with x,y,z). It would be nice to have
> the points connected by line segments.
>
> I think you can do this in matlab using patches? Is there a similar
> command in Octave. I don't want to install Matlab.
>
> There is a huge amount of stuff on the Web showing the various platonic
> solids in all their glory; but, I cannot seem to find something(Java ap)
> that lets you set the vertices plotted on the axis.
>
> Thanks.
> r._______________________________________________
> Help-octave mailing list
> address@hidden
> https://www.cae.wisc.edu/mailman/listinfo/help-octave
>
--
http://www.isr.ist.utl.pt/~etienne
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Drawing Polyhedra,
etienne <=