To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 5112
5111  |  5113
Subject: 
Re: It's all clear now...
Newsgroups: 
lugnet.cad.dev
Date: 
Wed, 6 Sep 2000 04:42:12 GMT
Viewed: 
603 times
  
Boy, talk about timing.  I'm currently in the process of adding primitive
substitution to LDView, and the ?-4cyls* primitives were next on my list.
However, while I could definitely tell they were different (one slope
appears concave; the other convex), I wasn't sure about the mathematical
shape.  I thought I was going to have to hard-code the Y values for each of
the slope points.

I didn't really want to do that, because, while all my primitive
substitutions currently use the same number of polygons as the original DAT
files, they are mathematically generated, and in the future could be set for
ultra-high detail.  This would only work, though, as long as they remain
mathematically generated.  And, since the various different primitives tend
to meet up with each other, the best quality would only be obtained if all
of them were generated with the same level of tesselation.

Some may ask why I am performing primitive substitution if what I end up
with is the same polygons I started out with.  There are actually two
reasons.  First, I can improve the performance by using quad strips,
triangle strips, and triangle fans in place of quads and triangles.  (I'm
currently seeing 10%-25% speedup in the tests I've done.)  Secondly, I can
improve the rendering quality by generating surface normals that point in
the correct direction, and rely on Gouraud shading to produce smooth
shading.

--Travis Cobbs (tcobbs@san.REMOVE.rr.com)

"Steve Bliss" <steve.bliss@home.com> wrote in message
news:qn1arso26cua6dm0gfghsj44n8jflmrclf@4ax.com...
This is one is for parts authors, I suppose...

I never understood the relation between the original sloped cylinder
primitives--1-4cyls.dat, 2-4cyls.dat--and the newer 1-4cyls2.dat.  Both
sets of files are the result of intersecting a cylinder with an angled
plane.  The difference is the angled plane.

(Suggestion: open both 1-4cyls.dat and 1-4cyls2.dat in L3Lab.  Turn up the
zoom to 12800, deselect BFC, select Show Axes, and choose random colors.)

For x-4cyls, the intersecting plane is Y = X - 1.

For 1-4cyls2, once the primitive is rotated around Y -90degrees (into the
X+/Z+ quadrant), the intersecting plane is Y = Z.

No big mathematical insights here.  Just two relationships to note:

1. 1-4cyls and 1-4cyls2 are complements.  If you put them together the
right way, they make a 1-4cyli.  Like this:

1 15 0 0 0 1 0 0 0  1 0  0 0 1 1-4cyls.dat
1 14 0 1 0 -1 0 0 0 -1 0 0 0 1 1-4cyls2.dat

Which is pretty cool, and it means that for any cylinder-plane • intersection
(where the plane is parallel to the X or Z axis), these primitives will • fit
the intersection.

2. This is sort of a corollary.  You can use multiple copies of 1-4cyls • and
1-4cyls2 to make a 4-4cyls.  Like this:

1 14 0 0 0 1 0 0 0 1 0 0 0 1 1-4cyls.dat
1 4 0 1 0 1 0 0 0 1 0 0 0 1 1-4cyls2.dat
1 3 0 1 0 1 0 0 0 1 0 0 0 -1 1-4cyls2.dat
1 2 0 0 0 1 0 0 0 1 0 0 0 -1 1-4cyls.dat
1 1 0 0 0 0 0 -1 0 1 0 1 0 0 2-4cyli.dat

So 1-4cyls2 is hidden in 2-4cyls -- it's the upper section of the sloped
area.  Like this:

1 16 0 0 0 1 0 0 0 1 0 0 0 1 1-4cyls.dat
1 16 0 0 0 0 0 -1 0 1 0 1 0 0 1-4cyli.dat
1 14 0 1 0 1 0 0 0 1 0 0 0 1 1-4cyls2.dat

Maybe this was discussed before, and I've forgotten since then.  I • stumbled
across it while making the minifig skeleton leg, and I thought I'd post • it,
in case anyone else finds it useful.

Steve



Message has 1 Reply:
  Re: It's all clear now...
 
Whoops, forgot the original point of my message: Thanks, Steve! --Travis Cobbs (tcobbs@san.REMOVE.rr.com) (24 years ago, 6-Sep-00, to lugnet.cad.dev)

Message is in Reply To:
  It's all clear now...  [DAT]
 
This is one is for parts authors, I suppose... I never understood the relation between the original sloped cylinder primitives--1-4cyls.dat, 2-4cyls.dat--and the newer 1-4cyls2.dat. Both sets of files are the result of intersecting a cylinder with (...) (24 years ago, 5-Sep-00, to lugnet.cad.dev)

8 Messages in This Thread:



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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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