?
Solved

Circle Segment

Posted on 1997-08-04
2
Medium Priority
?
434 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 200 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month12 days, 17 hours left to enroll

777 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