Hello Everyone,

I am working on a problem in java where I need to trace a point on the circumference of a circle that rotates around a point on the circumference of another circle.

I started by making sure I could get a circle first but did not know how to proceed from there. I just need a clearer understanding of what is being asked.

This is what I was thinking:

1) Draw the first circle

2) Pick any point within the first circle

3) Draw all circles based on that same point

Is this the correct logic? Your help is appreciated.

Thanks,

# trace a point on the circumference of a circle that

## rotates around a point on the circumference of another circle

Page 1 of 1## 6 Replies - 4851 Views - Last Post: 30 August 2009 - 08:37 PM

### #1

# trace a point on the circumference of a circle that

Posted 30 August 2009 - 06:05 PM

##
**Replies To:** trace a point on the circumference of a circle that

### #2

## Re: trace a point on the circumference of a circle that

Posted 30 August 2009 - 06:48 PM

After 159 posts you should know the rules (or you have a serious problem )

[rules][/rules]

[rules][/rules]

### #3

## Re: trace a point on the circumference of a circle that

Posted 30 August 2009 - 07:11 PM

Yeah, I am familiar with the policies. Anyhow I was trying to avoid posting code because it is a homework project. I was not clear what the question was asking. I was simply wondering if I was on the right track. Again I just don't know how to go about tracing a point on the circumference of a circle that rotates around a point on the circumference of another circle. In my first post I explained what I was thinking needed to be done. I am not asking for anyone to write the code for me. Just a clearer understanding of what is being asked. Thanks.

Here is the code for the full circle:

Here is the code for the full circle:

private static void drawCircle() { double radius = 50; double theta = 0; double radians; double deltaX; double deltaY; Display circle = new Display(350,6); for (int i = 0; i < 360; i++) { radians = toRadians(theta); deltaX = radius * cos(radians); deltaY = radius * sin(radians); circle.drawNextPixel((int)(200 + radius + deltaX), (200 + (int)deltaY)); theta++; } } private static double toRadians(double theta) { return(Math.toRadians(theta)); } private static double cos(double a) { return (Math.cos(a)); } private static double sin(double a) { return (Math.sin(a)); } // private static double Circumference(double radius) // { // return (Math.PI * 2 * radius); // }

### #4

## Re: trace a point on the circumference of a circle that

Posted 30 August 2009 - 07:19 PM

### #5

## Re: trace a point on the circumference of a circle that

Posted 30 August 2009 - 07:23 PM

You gotta be kidding me...I was just asking for some help here. Whatever man, I'll ask elsewhere.

### #6

## Re: trace a point on the circumference of a circle that

Posted 30 August 2009 - 07:25 PM

wartech, on 30 Aug, 2009 - 06:23 PM, said:

You gotta be kidding me...I was just asking for some help here. Whatever man, I'll ask elsewhere.

I think you haven't read the second part of my reply

You want to check on an Albanian site ?

See how posting code fix a lot of problems

This post has been edited by **pbl**: 30 August 2009 - 07:29 PM

### #7

## Re: trace a point on the circumference of a circle that

Posted 30 August 2009 - 08:37 PM

Page 1 of 1