Here is the idea. As it seems that you have no problems with rendering the roulette shown directly from above, when all circular shapes remain circular. If you want to show the same roulette assuming it is flat (see my comment about elevated rim), do such a simple thing: draw everything for exactly round concentric picture, that is, with ellipses being strictly circular, as seen from above. Do all the rendering: all circles, all straight like segments, fill all with the colors.

After this work is done, you need to transform your picture to the picture seen from and angle. For this purpose, simply perform some transform to your instance of

`Graphics`

. In this case, you need to vertically squize the picture. This can be done by the method `System.Drawing.Drawing2D.Matrix.Scale`

, using 1 for the first argument (horizontal direction) and some value < 1 for second argument (vertical direction). Please see:Matrix.Scale Method (Single, Single) (System.Drawing.Drawing2D)[^],

Matrix Class (System.Drawing.Drawing2D)[^],

Graphics.Transform Property (System.Drawing)[^].

I think this technique will be easy for your, because it does not require any real mathematics. Besides, I think I already saw that you are using

`System.Drawing.Graphics.Transform`

, so using it won't be a problem.Now, how about more realistic 3D image? I already explained: it will be considerably more compicated. Even if the outer rim was elevated, but the conical surface wasn't "segmented" and painted in its pattern, it would be simple: you could simply shift the out rim circle up and fill the space between the rims before transform. But with lines and different colors on the conical surface, you cannot do it. And of course, all of my consideration cannot apply if you want to show proper lighting and shadows. If you need all this, I already explained what you have to go in for: you should either do all the 3D math, including the calculation of all shapes in your projection, which needs a lot of work, or you can switch to 3D graphic rendering, in particular, OpenGL or WPF:

OpenGL — Wikipedia, the free encyclopedia[^],

3-D Graphics Overview[^],

3-D Transformations Overview[^].

For using WPF 3D graphics, you should either switch to WPF UI completely (recommeded), or use WPF in your

`System.Windows.Forms`

UI, which is also possible, in this way: Walkthrough: Hosting a WPF Composite Control in Windows Forms[^].On OpenGL for .NET, please see, in particular:

SharpGL — Home[^],

this CodeProject article can also be helpful: OpenGL in .NET - Getting Started[^].

See also: 3D modeling — Wikipedia, the free encyclopedia[^].

If your concerns are different or you have other questions, please clarify. Remember my advice on how you could formulate your question, in terms of the angles A-C-B and X-C-Z, or something like that.

And please, do yourself a big favor: don't be so rude anymore, don't tell people just trying to help you and clarify what your problem is that they should "not discredit" your question, which is, essentially, a way to ask people to shut up. With such talking, you hardly can hope for good help.

So what is that case when "when the ellipse is oval shaped"? Do you mean it is rotated, skewed, or what? What exactly are you trying to achieve?

—SA

None of two parameters which can define an ellipse is "radius". You probably mix up ellipse with an oval approximating the ellipse; such approximation is mainly dead practice which used to be used in manual technical drawing. Some generalization of the concept "radius" is only one value; it is described as a sum of lines: draw a line from one focus to any point of a ellipse line, from this point, draw a line to another focus. For an ellipse, this is a constant value which can be used as a generalization of the concept "radius" (or a half of this value, to be more precise). Obviously, for a circle, which is a special case of ellipse, too focus points come together at the circle center, and the two line segments I described become two equal radii.

You can also define your ellipse by width and height, but this is in a coordinate system when it is not rotated.

Look, this is a part of elementary mathematics (or almost elementary). Are you sure you are on right site? Perhaps you have to learn the required mathematical basics first. I understand why you are asking it here, because you are writing some code, but you have to be a bit more prepared. I'm not giving your the exact answer, first of all, because I'm not sure what your are trying to achieve. You are doing some transform. Doesn't it interfere with your problem? Would you be able to determine your angle without the transform and then use it? What angle do you need, exactly? Don't use the inapplicable concepts. Formulate the geometric value or construction precisely.

—SA

Also if you dont have an idea, then dont discredit my question.

I can see the picture, so what? Which lines on this picture represent the angle you are concerned with? Don't worry, I would easily create the geometry of the roulette. I just don't know which part of it makes a problem for you.

(Sigh...)

Now, this is just rude: "Also if you dont have an idea, then dont discredit my question."

This is you who "discredit" your question. You are the one who don't give me the idea, even on my request. To discredit something, this "something" should be credited.

Do you remember that you are not more free as other members; all have equal right for speech (set aside the fact I'm really trying to help you)? Who do you think is going to help you, with your, essentially, "please shut up" behavior?

—SA

I can suggest what you can do. You are asking about angles between something and something. You can do the following: draw 2 or 4 lines, make points at the ends of the line

segments and mark them with letters and say something like:

"Consider the angle A-C-B and X-C-Z". On a real roulette, they should be equal, but on my drawing, they don't equal. They should be the result of my tranform due to the look at some angle, not perpendicular to the plane of the ellipse. On the drawing, they should not be equal, due to this transform, but should produce the impression of equal angles".

Is that something you are concerned with? Or something else? Then the solution is pretty simple. However, with a 3D roulette, it's not as simple. A more realistic roulette has a conical shape. An outer rim is slightly elevated over the inner rim, so the black and read plates of the surface between them should be conical segment. Normal 2D drawing with ellipses would not help here. Ellipses can be simply vertically shifted against each other, that's it, but the surfice between them won't be result of any affine transform. You would need to mathematically calculate each segment of lines on a conical surface, or you have to use 3D rendering software, such as the one of WPF...

Your problem is: on the picture, it's clearly can be seen that you are trying to draw a flat roulette, which is not realistic. Your picture is vertically symmetrical, but is should not be, due to the fact that the outer rim is elevated in reality. But in this case all the related problems are trivial.

—SA