Solved

Circle Segment

Posted on 1997-08-04
2
430 Views
Last Modified: 2010-04-04
I have a drawn a circle and i want to draw a line from the middlepoint of the circle given the angle to the end of the circle (like a speedmeter). I use the following formula but can't get it working...Ellipse(0, 0, Radius, Radius);X := round(cos(PI * Angle / 180) * Radius / 2);Y := round(sin(PI * Angle / 180) * Radius / 2);MoveTo( round(Radius / 2), round(Radius / 2));LineTo( X, Y);with regards, Ronald
0
Comment
Question by:rvaken
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
mirek071497 earned 50 total points
ID: 1340484
You must change calculate for X and Y.

X := round(cos(PI * Angle / 180) * Radius / 2 + Radius/2);
Y := round(sin(PI * Angle / 180) * Radius / 2+ Radius/2);

This is because Ellipse( x1,y1,x2,y2 ) draw ellipse bounded on rectangle. (not Ellipse( x1,y1,r1,r2) !!! );


0
 

Author Comment

by:rvaken
ID: 1340485
Thanks, mirek... I lost the clue's... Couldn't see the prob anymore... :)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question