0

Beginner here, I need to separate a wheel by multiple lines without using the DrawPie method. I've been using guess and check but I feel so many lines is inefficient and I wanted to know if there's a way I can separate each line just by their angle alone. I need 37 partitions and the angle between each is 9.7 Degrees.

I tried making a Point called "RadiusPoint" and made it's x value equal to the (Cosine of 9.7)(length), and they y value equal to the (Sine of 9.7)(length), and then I drew a line from the start point (137, 137) to that, but I struggle thinking about what the value of length should be. At first I thought it should be the radius of the image, which is 113, but that value can't be applied to all 37 lines because it just makes one single line.

I'm not sure what to do here, is it possible to find a formula to find the length of the line, and make 37 partitions out of it with just the 9.7 degree angle & the start point (137, 137)? Or should I just stick to the guess and check. I know the former seems much more complicated but I feel like it would help me greatly for the rest of my code rather than just guess & checking. Any help would be enormously appreciated, thanks very much :)

The guess&check progress I've made on my wheel so far + my guess&check code for the graphic

vanilliqs
  • 3
  • 3
  • You have lines anchored at a center point. Use `Matrix.RotateAt()`, specifying the center point and the rotation angle. -- Or something like this: [Rotate Point around pivot Point repeatedly](https://stackoverflow.com/a/50478311/7444103) – Jimi May 16 '22 at 01:37
  • 1
    Remember that Pen and Brush are disposable objects (so you need to declare these object with `using` statements -- read *need to* as *must*) – Jimi May 16 '22 at 01:50

0 Answers0