Results 1 to 3 of 3

Thread: Dividing a circle into 26 segments

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Dividing a circle into 26 segments

    I am making a garden display using bricks. A portion of the brick garden area will be a circle made up of 26 bricks laid next to each other around the circumference of the circle where the corners of each brick touch. If I take the 26 bricks and lay then out into a complet circle I get a circle with a radius of approx 31 inches.

    The bricks are 7 1/2 inches long by 3 1/2 inches wide and 2 1/4 inches thick.

    Now I want to draw this circle using VB. I want to make a top-view of the circle of bricks. So, I need to make two circles; one circle is the inner circle of the bricks and the other circle is the outer circle or the other edge of the bricks. The radius of 31 inches will make the inner circle where the bricks touch each other. I also need to divide this circle into 26 segments (each segment represents the length of a brick). After the circle is divide into 26 segments I need to draw a line from one point to the other point of each segment which will represent the straight edge of the brick on the inside circle.

    I include a picture to show what I am talking about.
    Attached Images Attached Images  


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Dividing a circle into 26 segments

    You aren't actually drawing circles, though, you are drawing a series of rectangles that approximate a pair of circles. You might find it better to draw the rectangles and forget about the circles. Notice that I said "better", not "easier". Figuring out the points for each brick to draw them sounds like a better question for the Math forum (and if you would prefer to go that route, I do suggest you ask a mod to move this thread there, as there are some sharp people that only hang out in that forum, who could probably help with the math involved).
    My usual boring signature: Nothing

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

    Re: Dividing a circle into 26 segments

    You can basically treat the bricks as lines for the calculation, because it's only the inner edges you are interested in. So, draw a horizontal line of the appropriate length to represent the bottom brick. You can now draw second line of the same length start at the end of the other line and 360/26 degrees to the horizontal. Do that 24 more times, adding 360/26 degrees each time and you're done.
    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

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