Author Topic: Math - 3D Solid Challenge  (Read 6779 times)

0 Members and 1 Guest are viewing this topic.

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Math - 3D Solid Challenge
« on: January 29, 2008, 10:02:40 AM »
Anybody up for a 3D math challenge?  What I need to do is locate 3 blocks in 3D Space, and Connect them with 2 pieces of 3d "pipe"  Should be easy enough with the math, its the connecting Im having problems with.
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Re: Math - 3D Solid Challenge
« Reply #1 on: January 29, 2008, 10:06:39 AM »
The blocks needed are here as well
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Re: Math - 3D Solid Challenge
« Reply #2 on: January 29, 2008, 10:08:19 AM »
Now here is the challenge, Write a routine, preferable in VBA to accommodate varying C.L. to C.L. (centerline to centerline) heights.  the picture shown is a 6 foot separation
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second

MickD

  • Gator
  • Posts: 3285
  • (x-in)->[process]->(y-out)
Re: Math - 3D Solid Challenge
« Reply #3 on: January 29, 2008, 03:07:22 PM »
Do the angles of the 'T' pieces remain the same? this means the centre of the 2 bottom pieces will vary then yes?

If this is the case you need to create 2 vectors from the pipes, scale them to suit the changed height between the centres.
I'll knock up a quick piccy when I get to work and make sure we're on the same page.
Debugging:
Being the detective in a crime movie where you're also the murderer.

“Someone's sitting in the shade today because someone planted a tree a long time ago.”
- Warren Buffet

Bryco

  • Water Moccasin
  • Posts: 1848
Re: Math - 3D Solid Challenge
« Reply #4 on: January 29, 2008, 03:56:23 PM »
The hard part is the inverse matrix in vba for extruding the pipes.

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Re: Math - 3D Solid Challenge
« Reply #5 on: January 29, 2008, 03:59:09 PM »
The angle is always 30degrees b/t the 2 down pipes, the 2 bottom pieces would then have to move to accomodate the height difference.  Also, the blocks I posted can be edited if we need to move the insertion points.  After playing with it today, I ended p moving the ins pt to be more inline with the down pipe.  The problem I ran into was the V-part at the top.  The center of the V-pipes does not go through the center of the top piece, so I am having trouble figuring out how to calc where to go.  Maybe Im just over looking something  simple.
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Re: Math - 3D Solid Challenge
« Reply #6 on: January 29, 2008, 04:01:22 PM »
Bryco, I was thinking of using hard-coded numbers from the ins pt of the top piece to get to the location of the pipe start, and then doing the TAN calc based on CL to CL distance to do the extrusion.  Or Im totally in left field
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Re: Math - 3D Solid Challenge
« Reply #7 on: January 29, 2008, 04:02:10 PM »
99.999999% of the time the UCS will be world, and that .0000001% of the time, It wont work anyway.
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Re: Math - 3D Solid Challenge
« Reply #8 on: January 29, 2008, 04:03:26 PM »
I was thinking of drawing lines from start to end point for the pipes, and extruding a circle w/ the normal set to the line, the length calced.  Similiar to the horizontal and vertical extrusions you helped me with about a year ago
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second

MickD

  • Gator
  • Posts: 3285
  • (x-in)->[process]->(y-out)
Re: Math - 3D Solid Challenge
« Reply #9 on: January 29, 2008, 04:05:10 PM »
Here's the math part anyway (I think :) )
Debugging:
Being the detective in a crime movie where you're also the murderer.

“Someone's sitting in the shade today because someone planted a tree a long time ago.”
- Warren Buffet

MickD

  • Gator
  • Posts: 3285
  • (x-in)->[process]->(y-out)
Re: Math - 3D Solid Challenge
« Reply #10 on: January 29, 2008, 04:10:05 PM »
IRT pipe extrusions, draw the circle/s, translate to point and set normal to line direction as Duh said and extrude the length of the line. Some calc's would also be need to located the 'actual' sp and ep of the pipe as it won't be the full length of the line.

To derive the cot and csc use these -

csc = 1/sinA
cot = 1/tanA

plug 'em in and away you go ;)
Debugging:
Being the detective in a crime movie where you're also the murderer.

“Someone's sitting in the shade today because someone planted a tree a long time ago.”
- Warren Buffet

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Re: Math - 3D Solid Challenge
« Reply #11 on: January 29, 2008, 04:11:33 PM »
Mick, here is a pic showing the lower pieces moving inward to accomodate the shorter distance.
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second

MickD

  • Gator
  • Posts: 3285
  • (x-in)->[process]->(y-out)
Re: Math - 3D Solid Challenge
« Reply #12 on: January 29, 2008, 04:18:04 PM »
Good, that makes it easy then.
The length of the line to pnt1 in my piccy = 1/sinA x H
pnt1.x = -1/tanA x H
pnt1.y = -H


IRT to anything other than wcs, always do the modeling in wcs then xform into place, it's a lot easier.
« Last Edit: January 29, 2008, 04:41:28 PM by MickD »
Debugging:
Being the detective in a crime movie where you're also the murderer.

“Someone's sitting in the shade today because someone planted a tree a long time ago.”
- Warren Buffet

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Re: Math - 3D Solid Challenge
« Reply #13 on: January 29, 2008, 04:50:10 PM »
IRT ?
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second

MickD

  • Gator
  • Posts: 3285
  • (x-in)->[process]->(y-out)
Re: Math - 3D Solid Challenge
« Reply #14 on: January 29, 2008, 04:51:35 PM »
In Regards To :)
Debugging:
Being the detective in a crime movie where you're also the murderer.

“Someone's sitting in the shade today because someone planted a tree a long time ago.”
- Warren Buffet