To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.dat.parts.primitivesOpen lugnet.cad.dat.parts.primitives in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / LDraw Files / Parts / Primitives / 74
73  |  75
Subject: 
Re: Possible replacement for 1-8sphe.dat
Newsgroups: 
lugnet.cad.dat.parts.primitives
Date: 
Thu, 21 Sep 2000 20:24:41 GMT
Viewed: 
1139 times
  
In lugnet.cad.dat.parts.primitives, Travis Cobbs writes:
I started a discussion on the .dev group regarding sphere tesselation a
little while back, and it came out that there is some dissatisfaction with
the current sphere primitive.  I have finished the code which generates a
replacement sphere primitive, and hacked together a little routine to output
it to a .dat file.  Below is the result.

Please note that I have not yet generated linetype 5 lines.  I will only go
to the trouble to do that if there is interest in using my generated version
as a replacement for the original one.  I generated the data to 3 decimal
places.  Is this an appropriate number?

One thing that should be noted is that a triangular tesselation of a sphere
which contains 16 segments around its equator produces a sphere with
significantly different break-down of facets than the existing sphere file.
The existing 1-8sphe.dat file contains 9 quads and 4 triangles.  The
individual triangles are each less than half the surface area of the
individual quads, producing an unbalanced distribution.  In addition, the
quads are either non-planar, don't fall on the surface of an actual sphere,
or both.  My replacement tesselation is made up of 16 triangles, all of
which have a similar surface area.  In addition, all of the vertices fall on
the surface of an actual sphere (once you account for rounding).

Here is my file:

0 1/8 Sphere
0 Author: Travis Cobbs
0 Incomplete suggested replacement for 1-8sphe.dat primitive.
0
0 I will produce linetype 5 lines if there is interest in
0 using this as an actual replacement for 1-8sphe.dat.
0
0 This data was generated using the algorithm used by LDView to
0 perform sphere primitive replacement.  (The sphere primitive
0 replacement feature has not yet been released.)
0
3 16 1.000 0.000 0.000 0.924 0.000 0.383 0.924 0.383 0.000
3 16 0.924 0.000 0.383 0.784 0.439 0.439 0.924 0.383 0.000
3 16 0.924 0.000 0.383 0.707 0.000 0.707 0.784 0.439 0.439
3 16 0.707 0.000 0.707 0.439 0.439 0.784 0.784 0.439 0.439
3 16 0.707 0.000 0.707 0.383 0.000 0.924 0.439 0.439 0.784
3 16 0.383 0.000 0.924 0.000 0.383 0.924 0.439 0.439 0.784
3 16 0.383 0.000 0.924 0.000 0.000 1.000 0.000 0.383 0.924
3 16 0.924 0.383 0.000 0.784 0.439 0.439 0.707 0.707 0.000
3 16 0.784 0.439 0.439 0.439 0.784 0.439 0.707 0.707 0.000
3 16 0.784 0.439 0.439 0.439 0.439 0.784 0.439 0.784 0.439
3 16 0.439 0.439 0.784 0.000 0.707 0.707 0.439 0.784 0.439
3 16 0.439 0.439 0.784 0.000 0.383 0.924 0.000 0.707 0.707
3 16 0.707 0.707 0.000 0.439 0.784 0.439 0.383 0.924 0.000
3 16 0.439 0.784 0.439 0.000 0.924 0.383 0.383 0.924 0.000
3 16 0.439 0.784 0.439 0.000 0.707 0.707 0.000 0.924 0.383
3 16 0.383 0.924 0.000 0.000 0.924 0.383 0.000 1.000 0.000


--Travis Cobbs (tcobbs@san.REMOVE.rr.com)
I think these should have 4 decimal places, as with the majority of the
circular primitives. The reason for this is that there is often a need to use
3DPs in parts. Where these include circular primitives and scale them up by a
factor of 10 you lose one decimal place. It will also help to avoid the little
gaps between joined cylinders/disc and spheres, when rendered with programs
that dont do primitive substitution.

The primitive itself looks a big improvement. When I converted all the circular
primitives to 4DPs, I avoided the sphericals because of doubts over the
planarity of the quads.

Which reminds me of something I suggested at the time I did this (but admit
have not been very good at following in my own parts). When joining
quads/triangles to circular primitives, try to avoid calculating the
co-ordinates based on the actual radius (eg. round(6*sin(22.5), 0.001), but
rather round the sin and then multiply (eg. 6*(round( sin(22.5), 0.001). That
way the cordinates you use will match the scaled up primitive. I'll include
this in the authoring FAQ.

Chris



Message is in Reply To:
  Possible replacement for 1-8sphe.dat  [DAT]
 
I started a discussion on the .dev group regarding sphere tesselation a little while back, and it came out that there is some dissatisfaction with the current sphere primitive. I have finished the code which generates a replacement sphere primitive, (...) (24 years ago, 21-Sep-00, to lugnet.cad.dat.parts.primitives)

10 Messages in This Thread:






Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR