I know there are Math Wizards here

Discussion in 'SolidWorks' started by Corey Scheich, Nov 5, 2003.

  1. I was trying to calculate the circumference of an elipse in equations, so I
    entered this formula

    "D3@Sketch3" = 2*(pi)*Sqr(("D2@Sketch3"^2 + "D1@Sketch3"^2)/2)

    Where D2 is half the diameter of the major axis and D1 is Half the minor
    diameter. On the elipse that I have
    D2 = 1.0922455 and D1 = .75 The equation figured this to be 5.8644 but
    Solidworks says the length of the Elipse is 5.557 Then on my TI-86 it comes
    out to 5.88661 which is different yet. .002 is almost acceptable.
    that is almost .307 inches off what is the deal. Did I use the wrong
    formula or should I call the VAR.

    Corey Scheich
     
    Corey Scheich, Nov 5, 2003
    #1
  2. Funny, I just came across this a few days ago, while enhancing our
    SolidSketch add-in to make it place points at regular intervals along an
    ellipse...
    Actually, there is no exact formula for the circumference of an ellipse
    (yours is a ~rough~ approximation, if I may say... ;-)
    See http://home.att.net/~numericana/answer/ellipse.htm
    SolidWorks and your TI use different numeric integration algorithms to
    approximate the length. I don't know which is better...
     
    Philippe Guglielmetti, Nov 5, 2003
    #2
  3. Take an ellips with D1=1 and D2=100. My feeling says that the
    circumference should be pretty close to 200, right?

    So now find a formula that gets you there ;-).

    Harry 'math is my grandmothers middle name. Mine is exxxxxaggeration'
     
    Harry Kroonen, Nov 5, 2003
    #3
  4. Corey,

    As Phillipe says your formula is an approximation - there is no exact closed
    form solution.

    I entered your formula and values into SolidWorks 2004 and got 5.8866107.
    That agrees closely with your TI, suggesting that it uses the same
    approximation you do.

    The following site lists several improved approximations:

    http://astronomy.swin.edu.au/~pbourke/geometry/ellipsecirc/

    They state that for modest eccentricity it is hard to beat the second
    Ramanujan method:

    a - Major axis radius
    b - Minor axis radius
    e - eccentricity = Sqr(1 - b^2 / a^2)
    h = (a - b)^2 / (a + b)^2

    approx circumference = pi (a + b) [ 1 + 3 h / (10 + Sqr(4 - 3 h) ) ]

    (By modest eccentricity they mean b should not be very small compared with
    a - your example certainly qualifies.)

    I added an extra angle dimension to my sketch - D4, to take the place of h,
    and then replaced your equation with the following two equations:

    "D4@Sketch3" = (("D1@Sketch3"-"D2@Sketch3")/("D1@Sketch3"+"D2@Sketch3"))^2
    "D3@Sketch3"= pi * ("D1@Sketch3"+"D2@Sketch3") * (1 + 3 * "D4@Sketch3" /
    ( 10 + Sqr( 4 - 3 * "D4@Sketch3" ) ))

    The above equations gave a value of 5.837601 compared with SolidWorks
    measure 5.8378270, which looks like an improvement.

    I used an intermediate dimension for h (D4) because I didn't know how to
    create intermediate variables not associated with dimensions. (I guess this
    is not possible?) It is important to use an angular rather than a length
    dimension, as h is a ratio and so should be unitless.

    I can email you my sample part if you like.
     
    Paul Delhanty, Nov 5, 2003
    #4
  5. Corey Scheich

    Ray McHugh Guest

    Machinery's Handbook says the formula should be:

    "D3@Sketch3" = (pi)*Sqr(2*("D2@Sketch3"^2 + "D1@Sketch3"^2))
    Where D2 is *all* the diameter of the major axis and D1 is *all* the minor axis.

    Verified w/ D2 = 1.0922455 and D1 = .75 and result was 5.88661 in SWX 2001+.

    Ray
     
    Ray McHugh, Nov 5, 2003
    #5
  6. Thank you all I ended up going to the site Pillippe suggested and read all
    the interesting equations for this and selected an easy semi acurate one
    seems to come out quite a bit closer to what SW calculates.

    (pi) * ( 3 * ("D2@Sketch3"+"D1@Sketch3") - Sqr(( 3 * "D2@Sketch3" +
    "D1@Sketch3") * ("D2@Sketch3" + 3 * "D1@Sketch3")))

    Again D2 is half the long axis and D1 is half the short one

    Thanks again
    Corey Scheich
     
    Corey Scheich, Nov 5, 2003
    #6
  7. Hi Corey.

    Since the "Radius" is constantly changing, You are definitely in the
    "zone of calculus" and possibly even Trigulus or even Caligulus.

    I was able to lift these two approximations from a trusted source -

    Perimeter = PI * SQRT [ 2*(A^2 + B^2) ]

    &

    Perimeter = PI * SQRT [ 2*(A^2 + B^2) - ( (a-b)^2/2.2 ) ]

    These might help.

    Otherwise let's get our table of integrals & derivatives out and start
    scratching our heads.

    Regards,

    SMA
     
    Sean-Michael Adams, Nov 5, 2003
    #7
  8. Corey Scheich

    David Guest

    I believe the approximation formula is:

    "D3@Sketch3" = 2*(pi)*Sqr(((("D2@Sketch3"/2)^2) +
    (("D1@Sketch3"/2)^2))) if D2 and D1 are diameters.
     
    David, Nov 5, 2003
    #8
  9. Corey Scheich

    rocheey Guest

    Since the "Radius" is constantly changing, You are definitely in the
    Yogi Berra! I didnt know you used Solidworks! Welcome to the NG!
     
    rocheey, Nov 6, 2003
    #9
  10.  
    Paul Delhanty, Nov 6, 2003
    #10
  11.  
    Paul Delhanty, Nov 6, 2003
    #11
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.