Results 1 to 4 of 4

Thread: Generate (x) sided shape picture?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2011
    Location
    wherever I want
    Posts
    4

    Question Generate (x) sided shape picture?

    I want to make a project that you put in a amount of sides and it generates a shape that has that amount of sides.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Generate (x) sided shape picture?

    Great. What do you think you should do? What data do you think you would require to be able to draw such a shape? If you have no idea then you haven't spent enough time considering the problem. Here's a clue: if a shape has N sides then it also has N vertices.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: Generate (x) sided shape picture?

    And here's a couple more clues:
    1. Each vertex can be represented by a point
    2. Sum of the interior angles is a constant. That constant depends on the number of vertices and can be calculated by
    Code:
    sum = 180 * (N - 2) 'where N is the number of vertices
    3. With a regular polygon, all the interior angles are the same. Thus each angle = sum / N
    Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
    - Abraham Lincoln -

  4. #4
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,422

    Re: Generate (x) sided shape picture?


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width