I am creating an analog clock. so i hav to draw the line from center
to a point in the circle. How can i get the co-ordinates of the points
on the circle i fmention the radius and the center of the circle. 1 1719
On Thu, 21 Jun 2007 21:46:56 -0700, sravan_reddy001
<sr************ *@gmail.comwrot e:
I am creating an analog clock. so i hav to draw the line from center
to a point in the circle. How can i get the co-ordinates of the points
on the circle i fmention the radius and the center of the circle.
Assuming the clock is a normal circle, the standard trigonometric formulae
apply:
x = r * cos(t);
y = r * sin(t);
where "t" is the angle of the line (keeping in mind that screen displays
usually have the Y axis reversed from the standard mathematical coordinate
systems).
You do, of course, need to map your time values (hours, minutes, seconds)
to degrees. But that should not be difficult for you to figure out.
If you want an elliptical clock, you might check this thread I was just
involved in: http://groups.google.com/group/micro...b8ec877ef6e1b5
Pete This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Remon Huijts |
last post by:
Hi there,
For a very specific service, I have created a PHP script that uses the GD
library functions to create a PNG image from a few lines of XML data
describing a simple diagram/drawing. It's cool and works, writing the XML
data in a text editor is straightforward for me because I designed the
format. I have no idea however how I can make a simple online drawing
program that creates this XML code. The code is realy simple, just...
|
by: Atif |
last post by:
Hello all,
In my html page I want to add an image say of 800x600. Now I want that
when ever I am given two coordinates on this image say (x1, y1)=(50,
100) and (x2, y2)=(200, 300), the java script code will trace these
coordinates on the image and draw the line between these two points.
Can anyone please help me in writing the javascript code of this
problem?
Thanks and Regards
Atif
|
by: WindAndWaves |
last post by:
Hi Folks
Is it possible to draw pictures with Javascript? I would like to draw a
poly something (i.e. a shape with coordinates). It is for a mouse-over
effect to highlight certain areas on a map.
TIA
- Nicolaas
|
by: Steve Long |
last post by:
Hello, (total GDI newbie)
I'm having trouble drawing just a simple line to display in a picturebox. I
just want a straight, dotdash line.
I have two methods, one works and one doesn't (it cause an exception to be
thrown):
This one works but it's not the results I want.
private void CreateImage1()
{
|
by: davetelling |
last post by:
I am not a programmer, I'm an engineer trying to make an interface to a
product I'm designing. I have used C# to make a form that interrogates the
unit via the serial port and receives the data. I want to be able to draw
lines in a picturebox based upon certain data points I have received. I
dragged a picturebox from the toolbar onto my form, but after having gone
through the help files, looking online and trying a variety of things, I...
| |
by: YouPoP |
last post by:
I am doing an app (C# 2.0) where you can draw in a panel with your mouse in "real time". I actually have 2 problems;
1- it does not really is "real time", if your mouse move fast or very fast the line is added after a very small delay.
2-Because I use AddLine(), it adds very short lines from one point to another and it does not give a very good result. Also because of this and my "not real time" problem, when the mouse moves fast it adds...
|
by: Macias |
last post by:
Hi,
Please help me, how I can make a line drawing on PictureBox similar to
MS paint. I thinking about this: click and hold button, move mouse and
relase button.
I'm trying useing this g.DrawLine(..), but I have a lot of line.
In C++ is a parameter XORPUT, but in C# I can't find it.
|
by: Dave Bootsma |
last post by:
I have an application where I want to redraw a polygon from points I
retrieve from a file.
The file is read with streamreader line by line each line contains the
points for each polygon.
Below is a typical line from my file.
500,748 500,678 552,678 552,696 584,696 584,714 612,714 612,748
Each set of x,y coordinates is separated by a space.
How can I read this into my points collection. If I currently try I get
|
by: ThatsIT.net.au |
last post by:
I have this code that writes a pie chart in a asp.net page, but I want to
use it in a server control.
When I try I get a error on the last line "Response.OutputStream"
Obviously there is no response object but how do I write it to screen?
Dim objBitmap As New System.Drawing.Bitmap(400, 440)
Dim objGraphics As System.Drawing.Graphics
objGraphics = System.Drawing.Graphics.FromImage(objBitmap)
objGraphics.Clear(Drawing.Color.White)
|
by: James Hahn |
last post by:
That looks like proper Property set code to me. What is the line of code
that the designer is generating in the Sub InitializeComponent for a color
that you select in the Properties Settings?
"Nathan Sokalski" <njsokalski@hotmail.comwrote in message
news:er%23hyAFOJHA.1896@TK2MSFTNGP02.phx.gbl...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |