c# - Increase distance when draw a ellipse -
how can increase distance when draw ellipse point? code use draw ellipse in c#:
public double[] calculateposition(double centerx, double centery, double angle) { double[] position = new double[2]; position[0] = math.cos(angle) * radiusx + centerx; position[1] = math.sin(angle) * radiusy + centery; return position; } draw ellipse based on point. function use this, draw example 5 ellipses, around point.
do mean size of eclipse? in case, want vary radiusx , radiusy.
the best way pass them parameters function:
public double[] calculateposition(double centerx, double centery, double radiusx, double radiusy, double angle) { double[] position = new double[2]; position[0] = math.cos(angle) * radiusx + centerx; position[1] = math.sin(angle) * radiusy + centery; return position; } then can draw several ellipses around same point calling function several times, , varying radiusx , radiusy.
Comments
Post a Comment