Math Help Forum

Math Help Forum Feed Site Feed

Go Back   Math Help Forum > Math Help Forum Lounge > Chat Room
Reply
 
Thread Tools Display Modes
  #11  
Old 04-07-2008, 07:45 PM
Super Member
 
Join Date: Feb 2008
Location: Berkeley, Illinois
Posts: 288
Country:
Thanks: 4
Thanked 80 Times in 74 Posts
mathceleb will become famous soon enough
Default

Ok, I cannot assist you with shapes/drawing/geometric figures. I'm horrible with art and not much of a web/artistic designer.

If you did want an engine built that figures distances, or loops through possible combinations of points, I can do that.

If that doesn't help your cause, I understand. Reading what you just described, a java based calculator with a program that can build shapes and 3D-animation would be the way to go.
__________________
www.mathcelebrity.com
Reply With Quote
Advertisement
 
  #12  
Old 04-07-2008, 08:13 PM
Member
 
Join Date: Jan 2008
Posts: 34
Country:
Thanks: 3
Thanked 0 Times in 0 Posts
Dirlewanger is on a distinguished road
Default

Oh, I forgot to answer that question:

No, I am not at all interested in any graphics stuff! I just want the parameters for the ellipses. 5 numbers for each one of them.

I just drew those figures now in order to help explain the mathematical problem. That red-green-blue thing maybe was confusing. I did it just to explain that for each of the ellipse halves (the colored ones) there belongs a certain set of points. The points and ellipses and circles actually have no colors. They are just mathematical abstractions. The points are randomly distributed around each of their ellipse (half).
Quote:
If you did want an engine built that figures distances, or loops through possible combinations of points, I can do that.
This part I don't understand. But it doesn't sound like anything I am interested in!

Please, before you put any work into this, please clear things out with me. It is so easy to misunderstand, especially since I am not used to strict mathematical language.

I want to put in 2D coordinates for two or three sets of points, together with radii and distances defining the circles' relations to each other, and get back the ellipse parameters that fits it best according to least square or something like that.

I guess one makes an initial guess for parameters of one of the ellipses, then uses the geometry of the circles to calculate which parameter this implies for the other ellispes. Then one calculates the fit (least square or something like that). Then iterates and refits until the fit is good enough. From the geometry of it, one needs to formulate some optimization function which hopefully can have its derivatives solved so that an efficient numerical method can be applied.

There is a duality between the 2D projection, where there exists ellipses and points; and the 3D physical world, where there exists circles. A certain angle in the 3D world, corresponds to the length of an ellipse axis in the 2D projection.
Reply With Quote
  #13  
Old 04-07-2008, 08:21 PM
Member
 
Join Date: Jan 2008
Posts: 34
Country:
Thanks: 3
Thanked 0 Times in 0 Posts
Dirlewanger is on a distinguished road
Default

I'll think it through and make a better attempt at explaining things tomorrow.
Reply With Quote
  #14  
Old 04-07-2008, 08:27 PM
Super Member
 
Join Date: Feb 2008
Location: Berkeley, Illinois
Posts: 288
Country:
Thanks: 4
Thanked 80 Times in 74 Posts
mathceleb will become famous soon enough
Default

Quote:
Originally Posted by Dirlewanger View Post
Oh, I forgot to answer that question:

No, I am not at all interested in any graphics stuff! I just want the parameters for the ellipses. 5 numbers for each one of them.

I just drew those figures now in order to help explain the mathematical problem. That red-green-blue thing maybe was confusing. I did it just to explain that for each of the ellipse halves (the colored ones) there belongs a certain set of points. The points and ellipses and circles actually have no colors. They are just mathematical abstractions. The points are randomly distributed around each of their ellipse (half).

This part I don't understand. But it doesn't sound like anything I am interested in!

Please, before you put any work into this, please clear things out with me. It is so easy to misunderstand, especially since I am not used to strict mathematical language.

I want to put in 2D coordinates for two or three sets of points, together with radii and distances defining the circles' relations to each other, and get back the ellipse parameters that fits it best according to least square or something like that.

I guess one makes an initial guess for parameters of one of the ellipses, then uses the geometry of the circles to calculate which parameter this implies for the other ellispes. Then one calculates the fit (least square or something like that). Then iterates and refits until the fit is good enough. From the geometry of it, one needs to formulate some optimization function which hopefully can have its derivatives solved so that an efficient numerical method can be applied.

There is a duality between the 2D projection, where there exists ellipses and points; and the 3D physical world, where there exists circles. A certain angle in the 3D world, corresponds to the length of an ellipse axis in the 2D projection.
I attached a shell program for you. It has 2 points you enter, radius lengths, and a filler loop program when you press the button.

It sounds like what you want to do is guess through scenarios until you meet a fit with the ellipses/circles.

If this is what you want, please supply me the equations for what you want to check.
Attached Files
File Type: xls Dirlewanger.xls (23.0 KB, 21 views)
__________________
www.mathcelebrity.com
Reply With Quote
  #15  
Old 04-07-2008, 08:48 PM
Member
 
Join Date: Jan 2008
Posts: 34
Country:
Thanks: 3
Thanked 0 Times in 0 Posts
Dirlewanger is on a distinguished road
Default

Quote:
Originally Posted by mathceleb View Post
It sounds like what you want to do is guess through scenarios until you meet a fit with the ellipses/circles.
Well, I want a numerical method to efficiently find a good enough fit of ellispes to points. Much like this code does in Matlab:
MATLAB Central File Exchange - fit_ellipse
But for multiple related ellipses at once.

Quote:
If this is what you want, please supply me the equations for what you want to check.
I'll solve the geometry and provide the equations, yes!
Reply With Quote
  #16  
Old 04-07-2008, 09:30 PM
Super Member
 
Join Date: Feb 2008
Location: Berkeley, Illinois
Posts: 288
Country:
Thanks: 4
Thanked 80 Times in 74 Posts
mathceleb will become famous soon enough
Default

Quote:
Originally Posted by Dirlewanger View Post
Well, I want a numerical method to efficiently find a good enough fit of ellispes to points. Much like this code does in Matlab:
MATLAB Central File Exchange - fit_ellipse
But for multiple related ellipses at once.


I'll solve the geometry and provide the equations, yes!
I see, you need 7 entry points, a,b,c,d,e and a 2D point. But you want to fit more than 1 ellipse at once. Got it.

Let's talk tomorrow when you are back online.
__________________
www.mathcelebrity.com
Reply With Quote
  #17  
Old 04-08-2008, 04:19 AM
Grand Panjandrum


 
Join Date: Nov 2005
Posts: 10,426
Thanks: 517
Thanked 2,784 Times in 2,291 Posts
CaptainBlack has disabled reputation
Default

Quote:
Originally Posted by Dirlewanger View Post
Oh, I don't want to cheat! I don't study or anything. But I now realize that this suspicion and misunderstanding is natural given my brief post.

I'd need some code that solves a specific kind of problem. It includes curve fitting and probably requires numerical methods. Also, it needs to be a bit efficient, nothing extreme but it shouldn't waste computational power. Matlab M-code would be fine if it compiles well. I've looked at it and just might work my way through it in M-code, but it'd take me quite some time and effort. While I like math, I'm not very good at it...
:P

The code could be completely open source if someone else ever has some use for it. I leave that to the author. I just want to be able to use it myself, w/o commercial interests.

The problem is probably not very hard or time consuming at all for someone with more than rudimetnary math education. But it's a bit more than I'd ask someone to do for free, and the purpose is to get a piece of working code, rather than learning math.

I'll take a look at the problem again before I try to specify it.
You should be aware that if this is done in Matlab it will probably use a library
optimiser, and so not easily translated into another language. Though You
could probably produce something that could be called from another language
using the compiler.

RonL
Reply With Quote
  #18  
Old 04-08-2008, 07:38 AM
Member
 
Join Date: Jan 2008
Posts: 34
Country:
Thanks: 3
Thanked 0 Times in 0 Posts
Dirlewanger is on a distinguished road
Default

Quote:
Originally Posted by CaptainBlack View Post
You should be aware that if this is done in Matlab it will probably use a library optimiser, and so not easily translated into another language.
But I can compile Matlab code and run it as a free standing program, right? If I get VBA source code that solves the problem, I'll look at it and try to write M-code that does the same thing.
Reply With Quote
  #19  
Old 04-08-2008, 08:34 AM
Member
 
Join Date: Jan 2008
Posts: 34
Country:
Thanks: 3
Thanked 0 Times in 0 Posts
Dirlewanger is on a distinguished road
Default

I am on the way to formulate the restrictions which connect the ellipses which I want to fit simultaneously. Now I stumble on a part of that problem. Please consider this problem in isolation, which certainly must have a solution:


(Let C be the origo of a 3D coordinate system.)

V is constrained to the big circle with center M and known radius R = MB = MS = MV.
A is constrained to the small circle with center C and known radius r = CS = CA.
E is the intersection of lines CS and VB.
Angle AVE is known
What are the coordinates of point V?

M, C and B lie on a straight line.
Distances MC and CB are known.
Big circle and small circle intersect in point S (and a corresponing point one diameter away).
Big circle and small circle stand at a right angle to each other (angle MCS = pi/2).
Angle AEC = AES = AEV = pi/2.

The complication is, that as V is moved around its big circle, then not only does the distance VE change, but so does the distance AE too! For example, if V is placed in line with BCM, then AE = radius of the small circle.

Can someone crack the algebra of it? Or else I have to use a numerical method to find the coordinates of V, which must be done (twice) inside the iteration loop of the larger multi-ellipse fitting problem.










Last edited by Dirlewanger; 04-08-2008 at 08:51 AM.
Reply With Quote
  #20  
Old 04-08-2008, 11:00 AM
Super Member
 
Join Date: Feb 2008
Location: Berkeley, Illinois
Posts: 288
Country:
Thanks: 4
Thanked 80 Times in 74 Posts
mathceleb will become famous soon enough
Default

Dirlewanger,

I'm at work now, but I'll take a look at this during the week and see what I can do on Excel/VBA. I'll check back periodically to see if anybody else has answered this as well.
__________________
www.mathcelebrity.com
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -7. The time now is 07:49 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
©2005 - 2008 Math Help Forum


Math Help Forum is a community of maths forums with an emphasis on maths help in all levels of mathematics.
Register to post your math questions or just hang out and try some of our math games or visit the arcade.