## Re: [Fmaps-devel] News...

 Re: [Fmaps-devel] News... From: Franck Martin - 2000-06-20 08:02:09 Attachments: Message as HTML ```> About Polygons from OpenGL... There are utility programes in OpenGL or rather GLU that allows to break a polygon into convex objects: tessellation. However the procedures are expensives. They will be fine for digitisation or import but not for dispaly. The objects generated are: GL_TRIANGLE_FAN fan of triangles (1-2,2-3,3-4,4-5,5-6,6-1) GL_TRIANGLE_STRIP strip of triangles (1-3,3-5,5-6,6-4,4-2,2-1) GL_TRIANGLES individual triangles (1-2,2-3,3-1) (4-5,5-6,6-4) GL_LINE_LOOP closed line (no interior) but similar as a FAN We choose basically what type of objects we want as end result... Now to draw a succesion of joint triangles (mainly GL_TRIANGLES) you can specify which edge is visible and which one is not by using a glEdgeFlag(GL_TRUE) before passing the node (v0) glVertex3fv(v0). This is not necessary for fan and strip as OpenGL knows what is inside or outside.... There are also NURBS surfaces (Non-Uniform Rational B-Spline) in GLU. Cheers Franck ```

 RE: [Fmaps-devel] News... From: Franck Martin - 2000-06-20 04:58:02 ```NONE is when no geo object is associated with tuple REGION is a collection of polygons. Basically we need polygons, but from OpenGL we would rather need a collection of triangles... OpenGL doesn't know how to display concave polygons. You have to go through fancy programmation to make your concave object into a collection of convex objects. So we better store the collection of convex object. OpenGL gets the trick by a fourth coordinate that define if the segment of the convex object should be displayed as an edge or not. ARC is an ARC of circle ROUNDRECT is a rectangle with rounded edge You may have noticed that I made some modifs in the geo3d CVS to allow easier compilation and installation. I'm starting to understand make, automake, and autoconf... Unfortunatley the sql installation script are defined for the location of my lib/pgsql... Cheers.. Franck Martin Database Development Officer SOPAC South Pacific Applied Geoscience Commission Fiji E-mail: franck@... Web site: http://www.sopac.org.fj/ ; -----Original Message----- From: Eric G . Miller [mailto:egm2@...] Sent: Tuesday, June 20, 2000 4:25 PM To: fmaps-devel@... Subject: Re: [Fmaps-devel] News... Sorry, I've been remiss. Been doing alot of reading, hacking on geotrans2.03 a little (all the damn documents are in M\$ Word!). On Tue, Jun 20, 2000 at 12:19:35AM +1200, Franck Martin wrote: > Hi, > > The parliament is still held in hostage in Fiji, but life is ok > elsewhere... Damned U.S. media mostly stopped covering this... Though, they'll cover the front page for five days with stories about 2 missing hard drives at Lawrence Livermore Labs (Defense). Hard drives were misplaced! > I'm currently making a routine to import MIF/MID files into FMaps. > MIF/MID files are MapInfo ASCII files. I'm working a lot on MapInfo, > therefore it is easier to work with data I have already... Goody. Somewhere down the road I'll work on a Shapefile importer. It's pretty straight forward since we're using basically the same "tuple" type approach to spatial objects. (Shapelib has this silly 8.3 file name restriction -- could be hacked!). > For the moment I will import only point, waiting for Eric to define the > line.... Hint taken, line3d is in CVS (check README for string format). > MIF/MIF recognise the following objects: > NONE A NONE object is what? Nothing right? > POINT We have... > LINE Don't have lseg3d, but trivially the same as box3d (representation wise) > PLINE We now have... an open line type > REGION Is this a polygon type (including multiple disconnected polys)? > ARC We don't have this... Is this an arc of a circle or arc-node type of thing? > TEXT User attributes ... > RECT box3d (let zmin = zmax = 0.0) > ROUNDRECT Huh? Round rectangle? Definitely not Euclidean! > ELLIPSE Don't have yet, but would be trivial. Just need semi-major axis and 1/f inverse flattening. > All these objects are in 2D... Set elevation (z) = 0.0 (MSL or HAE...) Null is not allowed. -- #! /bin/sh echo 'Linux Must Die!' | wall dd if=/dev/zero of=/vmlinuz bs=1 \ count=`du -Lb /vmlinuz | awk '{ /^([0-9])+/ ; print \$1 }'` shutdown -r now _______________________________________________ Fmaps-devel mailing list Fmaps-devel@... http://lists.sourceforge.net/mailman/listinfo/fmaps-devel ```
 Re: [Fmaps-devel] News... From: Eric G . Miller - 2000-06-20 06:58:05 ```On Tue, Jun 20, 2000 at 05:48:43PM +1200, Franck Martin wrote: > NONE is when no geo object is associated with tuple Got it, just a regular "record" of attribute data. > REGION is a collection of polygons. Basically we need polygons, but > from OpenGL we would rather need a collection of triangles... OpenGL > doesn't know how to display concave polygons. You have to go through > fancy programmation to make your concave object into a collection of > convex objects. So we better store the collection of convex object. > OpenGL gets the trick by a fourth coordinate that define if the > segment of the convex object should be displayed as an edge or not. Yea, I've been thinking that 3d polygons don't make any sense. About all you get is wasted disk space. I was thinking we should just skip to surfaces as either meshes (grids) or tins -- probably both eventually. A triangle-group would be easy enough to define. It takes three point3d's. An array of triangles can be aggregated to form logical "polygons". So, a 2d polygon layer and an elevation model can be used to create tin-areas where the density of the triangles can be determined by the user, the local extrema of the dem and the "breaklines" of the polygon boundaries, and the tin-area "inherits" the attributes of the original 2d polygon. Guess we'll want to work out representation of gridded data (large object?) as well. Obviously, that fourth dimension will have to be figured at run time, based on viewing angle. Don't know squat about OpenGL though... > ARC is an ARC of circle Useful, but hard to mix in with regular lines, can be described by three points (Origin, and two points on the circle, or start, midpoint, end), or one point, four angles and a radius (P_0, r, theta_1, lambda_1, theta_2, lambda_2). Easiest seems the three point with the first being the origin, the second being the the start point and the third being the end. Related types would be spline curves and generic conic section types (would need rotation/translation parameters). Such types can form more natural looking objects. I've thought about making a generic conic section type. It'd have to have a domain and translation/rotation parameters. Basically, it'd be a set of coefficients for a generic conic with some extra parameters. It'd be a bit of math overhead in the rendering! > ROUNDRECT is a rectangle with rounded edge Hmm, still don't see how that's useful. Is it just for "graphic" objects? > You may have noticed that I made some modifs in the geo3d CVS to allow > easier compilation and installation. I'm starting to understand make, > automake, and autoconf... Unfortunatley the sql installation script > are defined for the location of my lib/pgsql... Yea, I noticed when I tried to commit. No big deal. It's about time I put the Makefiles in order. Well, I'll work on that triangle bit first, since it seems the most useful in the near future... -- #! /bin/sh echo 'Linux Must Die!' | wall dd if=/dev/zero of=/vmlinuz bs=1 \ count=`du -Lb /vmlinuz | awk '{ /^([0-9])+/ ; print \$1 }'` shutdown -r now ```
 Re: [Fmaps-devel] News... From: Franck Martin - 2000-06-20 08:02:09 Attachments: Message as HTML ```> About Polygons from OpenGL... There are utility programes in OpenGL or rather GLU that allows to break a polygon into convex objects: tessellation. However the procedures are expensives. They will be fine for digitisation or import but not for dispaly. The objects generated are: GL_TRIANGLE_FAN fan of triangles (1-2,2-3,3-4,4-5,5-6,6-1) GL_TRIANGLE_STRIP strip of triangles (1-3,3-5,5-6,6-4,4-2,2-1) GL_TRIANGLES individual triangles (1-2,2-3,3-1) (4-5,5-6,6-4) GL_LINE_LOOP closed line (no interior) but similar as a FAN We choose basically what type of objects we want as end result... Now to draw a succesion of joint triangles (mainly GL_TRIANGLES) you can specify which edge is visible and which one is not by using a glEdgeFlag(GL_TRUE) before passing the node (v0) glVertex3fv(v0). This is not necessary for fan and strip as OpenGL knows what is inside or outside.... There are also NURBS surfaces (Non-Uniform Rational B-Spline) in GLU. Cheers Franck ```