• Post Reply Bookmark Topic Watch Topic
  • New Topic

can any one make this program  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Write a program in Java that calculates the cartesian coordinates of a N sided polygon with side length D. ( Input Integral Values for N & D ).....................


if any one have any idea about this.please help me???
 
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

On your way in you may have missed that we have a policy on screen names here at JavaRanch. Basically, it must consist of a first name, a space, and a last name, and not be obviously fictitious. Since yours does not conform with it, please take a moment to change it, which you can do right here.

As to your question, that sounds like homework that you should be doing. We can help you with the Java implementation if you get stuck, but the basic ideas need to come from you. Have you had any thoughts on how to go about it?
 
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by champ vicky:

if any one have any idea about this.please help me???


Geometry 101. If all sides of a polygon are the same size, then the angles at each vertex is the same. Given the number of sides, you can easily find the angle at the vertex. With a length of a side and angle at the vertex, and one point of the polygon, you can find the next point of the polygon, and so on, til you get the original point.

Henry
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!