VB.NET School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 307,153 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 1,662 people online right now. Registration is fast and FREE... Join Now!




Circle with points

 

Circle with points, To make a circle on a form using a collection of points

Tinsae

6 Sep, 2009 - 05:53 AM
Post #1

New D.I.C Head
*

Joined: 6 Sep, 2009
Posts: 5

I want someone to help me on using graphics on vb.net form.I am planing to make a clock
so first i want to draw 12 points in a circular fashion; how do i do that?

User is offlineProfile CardPM
+Quote Post


mark.bottomley

RE: Circle With Points

6 Sep, 2009 - 12:08 PM
Post #2

D.I.C Addict
****

Joined: 22 Apr, 2009
Posts: 868



Thanked: 148 times
My Contributions
12 points is 30 degrees every tick - drag out your trig. The points are at (1, 0), (0.866, 0.5), (0.5, 0.866), (0, 1), (-0.5, 0.866), ... You can scale these points to whatever size you want and shift them to whatever position you want.
User is offlineProfile CardPM
+Quote Post

dzone41

RE: Circle With Points

8 Sep, 2009 - 12:17 AM
Post #3

D.I.C Head
Group Icon

Joined: 21 Aug, 2009
Posts: 215



Thanked: 37 times
Dream Kudos: 175
My Contributions
I have made an analog clock myself. I googled up all the trig formulas that I had forgotten and some I never knew in the first place. This was one of the very first VB apps I tried my hand at so it's not too awful.
All points have X and Y values. Tackle one value at a time with sin and cos. Use radians instead of degrees to make the trig less confusing.
Sin and Cos with degrees is great for angles 0 through 90 but after that keeping your +'s and -'s straight can be a handful.
Don't let the trig intimidate you. Just find the formulas online and apply them in your code.
Learn how to use radians, if I remember right, functions usually convert from radians to get degrees in the first place.
Good luck.

This post has been edited by dzone41: 8 Sep, 2009 - 12:21 AM
User is offlineProfile CardPM
+Quote Post

Tinsae

RE: Circle With Points

14 Sep, 2009 - 01:52 PM
Post #4

New D.I.C Head
*

Joined: 6 Sep, 2009
Posts: 5

QUOTE(dzone41 @ 8 Sep, 2009 - 12:17 AM) *

I have made an analog clock myself. I googled up all the trig formulas that I had forgotten and some I never knew in the first place. This was one of the very first VB apps I tried my hand at so it's not too awful.
All points have X and Y values. Tackle one value at a time with sin and cos. Use radians instead of degrees to make the trig less confusing.
Sin and Cos with degrees is great for angles 0 through 90 but after that keeping your +'s and -'s straight can be a handful.
Don't let the trig intimidate you. Just find the formulas online and apply them in your code.
Learn how to use radians, if I remember right, functions usually convert from radians to get degrees in the first place.
Good luck.


sorry for the late reply!!
Your idea seems boring but it was enjoying. I didn't even have to look for google to find the formulas i wrote them in 20 minutes(To challenge my self!!! hahaha) finally i kept patient and i did it.Thankes a lot thanks. I tried to post the executable file of my ready made program but i couldn't(I am not allowed to post .exe files)

Thanks
Tinsae
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 05:05PM

Live VB.NET Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month