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 / 10009
10008  |  10010
Subject: 
Mathematical assistance please
Newsgroups: 
lugnet.cad.dev
Date: 
Thu, 6 Jan 2005 17:58:13 GMT
Viewed: 
1662 times
  
Hi,
  I'm a much better arithmetician than mathemetician and have hit a wall with
LSynth.

  In an attempt to reduce file size, I've written an algorithm that merges hose
segments together (based on an angle error limit).  This dramatically reduces
file size, but leaves us with a problem.

http://www.brickshelf.com/gallery/kclague/temp/synth1_s.bmp

  The curvature of the hose looks good enough, but the gaps between the segments
is quite visible.

  I know what to do, but not quite how......

http://www.brickshelf.com/gallery/kclague/temp/example.bmp

  I can fill the gaps between the two segments with two 4-4cyli.dat (the
yellowish green and light blue segments between the two cylindrical dark green
and dark blue.)

  Lets start with the first three segment points in the hose.  We'll call them
S0, S1, and S2. I know that S0, S1, and S2 form a plane.

  I also know how to find the angle between the lines S0-S1 and S1-S2 (that is
how I merged segments in the first place).

  I also know that the diagonal cuts on the 4-4cyli.dat are along a plane that
is perpendicular to the S0-S1-S2 plane, and bisects the angle between lines
S0-S1 and S1-S2.

  I know how much to stretch the 4-4cyli.dat lengthwise to get me half the angle
between S0-S1 and S1-S2.

  I need to know how to orient the 4-4cyli.dat so that it lines up with the
cylindrical hose segment from S0-S1, or the hose segment from S1-S2.

  The bulk of the orientation is the same as the hose segment, but the twist of
the 4-4cyli.dat is where I'm stumped.  I know that the longest part of the
4-4cyli.dat needs to be on the plane S0-S1-S2, and needs to be on the outside of
the angle S0-S1 and S1-S2.

  Can anyone help me translate the above information into the matricies that
LDraw uses?

Thanks a lot.

Kevin



Message has 2 Replies:
  Re: Mathematical assistance please
 
Hello Kevin, (...) What about using 4-4cyls primitives placed to the end of hose segments? Scale their length to (hose diameter)*tan(angle/2). See example for a 30° angle: (URL) and (URL) know, this is not a full solution, you need to rotate the (...) (20 years ago, 6-Jan-05, to lugnet.cad.dev)
  Re: Mathematical assistance please
 
(...) Why not just work out the longest side of the cylinder you need, and extend the hose segments by that much on each end? That would reduce the file size even more. BTW, if you do decide to go with your solution, and come up with a result, you (...) (20 years ago, 6-Jan-05, to lugnet.cad.dev)

13 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