Click here to Skip to main content
15,881,757 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: How to calculate FDIST Pin
sumit703429-Jul-08 18:00
sumit703429-Jul-08 18:00 
QuestionHow to find the values of x and y in a 90 degree sector Pin
pallaka22-Jul-08 20:53
pallaka22-Jul-08 20:53 
AnswerRe: How to find the values of x and y in a 90 degree sector Pin
dojohansen22-Jul-08 21:45
dojohansen22-Jul-08 21:45 
AnswerRe: How to find the values of x and y in a 90 degree sector Pin
Stephen Hewitt22-Jul-08 21:52
Stephen Hewitt22-Jul-08 21:52 
GeneralRe: How to find the values of x and y in a 90 degree sector Pin
pallaka22-Jul-08 22:27
pallaka22-Jul-08 22:27 
AnswerRe: How to find the values of x and y in a 90 degree sector Pin
CPallini22-Jul-08 22:05
mveCPallini22-Jul-08 22:05 
GeneralRe: How to find the values of x and y in a 90 degree sector Pin
pallaka22-Jul-08 22:28
pallaka22-Jul-08 22:28 
QuestionRe: How to find the values of x and y in a 90 degree sector Pin
CPallini22-Jul-08 22:40
mveCPallini22-Jul-08 22:40 
pallaka wrote:
if the value is zero it should draw in the Center of the circle( means in the corner of the 90 deg ARC)
if the value is 50 it should draw in the middle of the ARC
if the value is 100 it shold draw of the circumference of the circle/ ARC


This is the opposite of the previous post (wherein you stated 100 should be at the circle center). Anyway it is not difficult to place the point onto the ray
(assuming ray=1)

x(n) = (n * cos(angle)) / 100;
y(n) = (n * sin(angle)) / 100;


But what to do with angle (since you left this degree of freedom free...)?
You may pick a random value or do you want to choose a fixed one (you put only the constraint 0° <= angle <= 90°)?


BTW: If you need to populate randomly (and uniformly) a circular sector, well, that's a completely different matter!

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke


[My articles]

AnswerRe: How to find the values of x and y in a 90 degree sector Pin
pallaka22-Jul-08 22:44
pallaka22-Jul-08 22:44 
GeneralYou're welcome Pin
CPallini22-Jul-08 22:50
mveCPallini22-Jul-08 22:50 
GeneralRe: How to find the values of x and y in a 90 degree sector Pin
pallaka22-Jul-08 22:33
pallaka22-Jul-08 22:33 
QuestionUnicode to html Pin
michela21-Jul-08 0:36
michela21-Jul-08 0:36 
AnswerRe: Unicode to html Pin
Paul Conrad21-Jul-08 4:20
professionalPaul Conrad21-Jul-08 4:20 
AnswerRe: Unicode to html Pin
dojohansen22-Jul-08 22:09
dojohansen22-Jul-08 22:09 
QuestionWrap values with upper and lower bound? [modified] Pin
Thrash50520-Jul-08 11:08
Thrash50520-Jul-08 11:08 
AnswerRe: Wrap values with upper and lower bound? [modified] Pin
Luc Pattyn20-Jul-08 11:31
sitebuilderLuc Pattyn20-Jul-08 11:31 
GeneralRe: Wrap values with upper and lower bound? Pin
Thrash50520-Jul-08 11:55
Thrash50520-Jul-08 11:55 
GeneralRe: Wrap values with upper and lower bound? Pin
Luc Pattyn20-Jul-08 12:01
sitebuilderLuc Pattyn20-Jul-08 12:01 
GeneralRe: Wrap values with upper and lower bound? Pin
Thrash50520-Jul-08 12:14
Thrash50520-Jul-08 12:14 
GeneralRe: Wrap values with upper and lower bound? Pin
Luc Pattyn20-Jul-08 12:26
sitebuilderLuc Pattyn20-Jul-08 12:26 
GeneralRe: Wrap values with upper and lower bound? Pin
Thrash50520-Jul-08 12:34
Thrash50520-Jul-08 12:34 
GeneralRe: Wrap values with upper and lower bound? Pin
Luc Pattyn20-Jul-08 12:45
sitebuilderLuc Pattyn20-Jul-08 12:45 
GeneralRe: Wrap values with upper and lower bound? Pin
Thrash50520-Jul-08 12:57
Thrash50520-Jul-08 12:57 
QuestionPostfix Multidigit Expression Evation in C# Pin
sadiyaVasanthKumar18-Jul-08 22:09
sadiyaVasanthKumar18-Jul-08 22:09 
AnswerRe: Postfix Multidigit Expression Evaluation in C# Pin
cp987619-Jul-08 2:17
cp987619-Jul-08 2:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.