Answered by:
ellipse divided into angles

Hi,
I want some ideas to divide an ellipse into n number of angles in windows store app using xaml and c#.
thanks in advance.
 Edited by deep12 Monday, March 3, 2014 12:23 PM
 Moved by Matt SmallMicrosoft employee, Moderator Monday, March 3, 2014 1:23 PM C# question
Monday, March 3, 2014 12:22 PM
Question
Answers

Id' use something like :
dx = line_length * cos(radians(angle))
dy = line_length * sin(radians(angle))I guess just divide 360 by the number of items, and that would be your angle. dx and dy would then be the edge of the circle where your item is drawn.
If you have an ellipse, multiply the line_length for one of the terms (dx or dy) by the ellipses height to width ratio as appropriate for your ellipse.
Darin R.
 Marked as answer by Matt SmallMicrosoft employee, Moderator Thursday, March 6, 2014 2:37 PM
Monday, March 3, 2014 10:34 PM
All replies

Meaning what exactly? I can give you a hundred different ways to do this but you haven't stated what you're trying to achieve.
Matt Small  Microsoft Escalation Engineer  Forum Moderator
If my reply answers your question, please mark this post as answered.
NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.Monday, March 3, 2014 1:24 PMModerator 
OK, what exactly I need is, I have to set n number of images on the circumference (outer ring) of the ellipse and it should be such that all the images sits in equal distance.
So wanted to divide the ellipse into some angles. Pls suggest if any other solution .
thanks.
Monday, March 3, 2014 1:48 PM 
Id' use something like :
dx = line_length * cos(radians(angle))
dy = line_length * sin(radians(angle))I guess just divide 360 by the number of items, and that would be your angle. dx and dy would then be the edge of the circle where your item is drawn.
If you have an ellipse, multiply the line_length for one of the terms (dx or dy) by the ellipses height to width ratio as appropriate for your ellipse.
Darin R.
 Marked as answer by Matt SmallMicrosoft employee, Moderator Thursday, March 6, 2014 2:37 PM
Monday, March 3, 2014 10:34 PM