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
Solved

Circle Segment

Posted on 1997-08-04
2
401 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
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

791 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