Home Overview FAQ Documentation Download Mailing List Geomview For Windows? Support Users Development Bug Reporting Contributing Contact Us Sponsors
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Update REQ 5511]: Cylinders
Yes. For example, here's a simple "awk" script to generate an OOGL cylinder. Note that it uses a u-wrapped mesh, i.e. the last vertex in each row is implicitly connected to the first vertex in the same row. It would still produce a cylinder if it were changed to produce a plain MESH and if the (u/nu) were changed to (u/(nu-1)) so that the last vertex of each row were duplicated. However, then the cylinder would show a seam at that point when smooth-shaded: the computation of surface normals depends on having the surface be unbroken. #! /bin/sh nawk ' BEGIN { nu = 40; nv = 2; print "uMESH"; print nu, nv; for(v = 0; v < nv; v++) { z = 2*v/(nv-1) - 1; for(u = 0; u < nu; u++) { t = 2*3.14159*u/nu; x = cos(t); y = sin(t); print x, y, z; } } exit; }'
|
||
Home | Overview | FAQ | Documentation | Support | Download | Mailing List Windows? | Development | Bug Reporting | Contributing | Contact Us | Sponsors |
|||
site hosted by |