Hi,
I have few set of point in the form (x,y coordinate),I would wish to draw a ellipse (i.e.circle) such that it all points fall within the circle.Would really appreciate if some one can help me .
Let me explain you where I am exactly struggling .
I am able to draw right angled triangle. Am generating few set of dynamic point (i.e x,y coordinates) these points are scattered all around the region, what I am looking for is that I wish to draw a ellipse or circle in such a way that all points fall with in the region (circle) .
No I have set of finite points (x,y coordinates) grey circle is one am able to do but it covers extra area but I only need to cover those dense area i.e the pink circle .
Kir, Chrisir is breaking down the problem for you so it's easier to work you towards a solution. Say you only needed to find the circle around two points. Then how would you draw it? Hint,
I found the grey circle by averaging the set of points (x,y). I took the avg(x,y) as the reference point . I found the distance from this point i.e avg (x,y) to all other points . Among them I took the largest distance as radius and drew a circle from avg (x,y) !!!!!
Answers
a nice task!
I appreciate the beauty of the problem.
break it down into smaller steps.
what do you need for a circle?
make a list.
imagine you'd have only 2 points.
Where would you start?
Hi Chrisir thanks for that post !!!
But sorry I didn't get what you said.
Let me explain you where I am exactly struggling .
I am able to draw right angled triangle. Am generating few set of dynamic point (i.e x,y coordinates) these points are scattered all around the region, what I am looking for is that I wish to draw a ellipse or circle in such a way that all points fall with in the region (circle) .
IF you guide me I can send the snapshot of it .
Really looking forward for your reply. Thanks !!!
understood
you need to draw a circle.
what do you need to draw a circle?
hi,
reference point and the radius.
ok, let's say you have only two points
where would the reference point for the circle be?
it can be any one among them . http://www.online-image-editor.com/index.cfm?fa=download_file&image_path=http://imagehost4.online-image-editor.com/oie_upload/images/89214EI12nHArwj/mVivvO6E2bzF.png
Do find the above link for the snap shot of what I am looking for .
No no
I lead you through
again
let's say you have only 2 points P1 and P2
where is the center of the circle then?
HOW can you calulate it?
It's a thought experiment: if you had only 2 points
No I have set of finite points (x,y coordinates) grey circle is one am able to do but it covers extra area but I only need to cover those dense area i.e the pink circle .
Kir, Chrisir is breaking down the problem for you so it's easier to work you towards a solution. Say you only needed to find the circle around two points. Then how would you draw it? Hint,
is wrong.
also post your entire code please
@ colouredmirrirorball
Thank u for ur post. POINT IS
http://www.online-image-editor.com/index.cfm?fa=download_file&image_path=http://imagehost4.online-image-editor.com/oie_upload/images/89214EI12nHArwj/mVivvO6E2bzF.png
U find the above url for the snapshot for which i am trying to find the answer.
"The requested URL /oie_upload/images/89214EI12nHArwj/mVivvO6E2bzF.png was not found on this server."
(you can upload an image to this forum using the button above the text box, the one on the left that looks like a picture)
I found the grey circle by averaging the set of points (x,y). I took the avg(x,y) as the reference point . I found the distance from this point i.e avg (x,y) to all other points . Among them I took the largest distance as radius and drew a circle from avg (x,y) !!!!!
I want to get only the pink circle as result....
what grey circle. we cannot see a grey circle because the urls you posted are broken.
@ koogs
I have the image on my desktop !!!!
i can't see your desktop
@ koogs
To find the below url see if u can access it
http://www.online-image-editor.com/index.cfm?fa=download_file&image_path=http://imagehost4.online-image-editor.com/oie_upload/images/8104983mrVL33/1b0OrOFtZ7Sp.png
yeah i hope u got my snap shot ???
were you given an algorithm or do you have to work it out yourself (which is hard)?
luckily someone already has: http://www.personal.kent.edu/~rmuhamma/Compgeometry/MyCG/CG-Applets/Center/centercli.htm
hi Koogs,
I really appreciate ur help.THANKS A TON!!! I am suppose to implement this in processing !!!
I wanted to lead you to understand that you have to take the average of all points positions
Now you write you have that... Why didn't you write that.... also the distance is the right approach
Now it doesn't work... why didn't you say so?
Post your code so we can have a look....
[unformated code deleted, see below]
@ CHRISIR
SORRY !!! Am completely new to this. Sorry do find the above code let me know !!!
http://forum.Processing.org/two/discussion/8045/how-to-format-code-and-text
thank u GoToLoop for that post !!!!!!!!!!!!!!!!!!
That code does not look very complete.
paste code. highlight code. hit ctrl-o.