Register for your free account! | Forgot your password?

You last visited: Today at 21:58

  • Please register to post and access all features, it's quick, easy and FREE!


move object around circle on c#

Old   #1
elite*gold: 0
Join Date: Jan 2012
Posts: 164
Received Thanks: 22
move object around circle on c#

this isn't related to co
if u got 2 object , circle and image (or another small circle)
how to let the small circle goes around the big one (from it's center it's center throw the circumstance of the big one) , well what about the small one spin around itself ?

i was trying to do this but Graphics >> creategraphics dont actually gives u the graphic u created as object , it just draw it -.-

any idea or link will be appreciated ..

p.s dont try to get coords throw the big circle being object , try to get it from radius (as every coordinate on the circle is an end point of a radius and it's projection is a 90 degree , which actually it's projection is Y and triangle third side is the X wish it made sense)

injection illusion logic is offline  
Old   #2
elite*gold: 0
Join Date: Jun 2006
Posts: 457
Received Thanks: 67
not sure what you're asking... if you want a small circle to be moving on the circumference of the bigger circle, you can definitely use the right angled triangle method to assign new coordinate for your small circle, and redraw it. Iterate the pre mentioned procedure you will be able to get the small circle moving.

shitboi is offline  
Old   #3
elite*gold: 0
Join Date: Jan 2012
Posts: 164
Received Thanks: 22
true but that's in case the big circle is actually an object which i cant do in c# that's why im asking for help
for example
Pen pencolor2 = new Pen(Color.Red);
Graphics draw;
r = d1 / 2;
draw = CreateGraphics();
draw.DrawEllipse(pencolor2, forx(350, r), fory(150, r), d1, d2);
now after i draw a circle , how will i use it and it's just a line o-0
aka it's not an object unlike picture
sumopic.Location = new System.Drawing.Point(forx(350,50),fory(150,50));
got my point ?
P.S forx,fory is just methods editing the center as create graphics always using the upper left vertex to draw from not mid point

edit : here is the math
int circlePosX = centerX + Math.Cos(degrees) * radius;
int circlePosY = centerY + Math.Sin(degrees) * radius;

where timmer ticks and the angel(degrees) set the speed and this prev method is the path
anyone ?
injection illusion logic is offline  
Old   #4
elite*gold: 21
Join Date: Jul 2005
Posts: 9,196
Received Thanks: 5,305
Yes, I actually bothered to log in to answer this because it both intrigued me (yay graphics) and confused me (yay stupid me).

#1: If you're dealing with graphics... use a graphics framework. XNA is fantastic and super powerful.

#2: If you insist on using base C# then either A: apply proper graphics procedures or B: write in a way that fits with application approach to programming.

If you do wish to work without a framework then you want what amounts to a game loop.

In this case you clear the entire screen and then re-draw the 'current' frame every time you wish to update. This is messy because you're trying to mix your approaches and you loose any benefit or controlability that using a gameloop would give you when used in the proper context (again, look at xna)

If you want to stick with the application type approach then it's also very simple... Instead of using a pen tool to draw an elipse, create an image to represent your circle (can be done programatically from inside the program) and simply move the location of this image around another image.

To clarify, when I say you can create it from inside the program I mean you can manually assign the pixel values for the image to draw a circle as you wish it to look.

pro4never is offline  
1 User
Old   #5
elite*gold: 0
Join Date: Jan 2012
Posts: 164
Received Thanks: 22
**** my question the most awesome thing that i saw u here once again
and yes if u r drawing in an imagebox it wont be effected with the graphic update which wont remove all what u draw at refresh(ex: minimizing and once any other object move on them)
but yeah framwork with xna is amazing , was trying to build it as native c# but when i used xna it saved alot for me
about image box it's hard to interact with another objects (aka if u got a picture of png with a transparent background it will still not show what's under it which is called layers in photoshop)
thanks once more for the reply and really happy that u logged in to reply

injection illusion logic is offline  

« Previous Thread | Next Thread »

Similar Threads
Help Circle Tool
Who can help me with circle tool plz i cant use it:confused:. plz help
4 Replies - DarkOrbit
Circle Scatter or Circle Right-Clicker
K, I made this simple Macro with Macro Express 3 and I'm pretty sure you can't use it without Macro Express, so if you don't have it you should look...
14 Replies - CO2 Bots & Macros
Overhill Circle
Ich wollte nur bescheid sagen,dass die anwendung von hacks nun auf den Overhill-Circle endteckt wird und man recht flott gebannt wird. Da sie ein...
0 Replies - WoW Main - Discussions / Questions
Fire Circle.
Where and how to upgrade fire circle fastest way ?
2 Replies - CO2 Main - Discussions / Questions

All times are GMT +1. The time now is 21:58.

Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2017 elitepvpers All Rights Reserved.