A Flash Developer Resource Site

# Thread: Convert Ellipse to Isometric

1. ## Convert Ellipse to Isometric

Hello all. Messing around with some isometric stuff. I've found out how to convert an exact point on a 2d grid to an isometric grid with the following function:
code:
```
function convertToIso(pointSent:Point) {
var returnPoint:Point=new Point((pointSent.x- pointSent.y),(pointSent.x+pointSent.y )/2);
return (returnPoint);
}
```

Which works great. Now however I'd like to be able to draw a circle or oval on a 2d grid and match that up with the isometric. Here is as far as I've got...

Code:
```var clickPoint:Point=new Point(grid1.mouseX,grid1.mouseY);
var clickPoint2=convertToIso(clickPoint);
grid1DrawArea.graphics.drawEllipse(clickPoint.x,clickPoint.y,30,30);
grid2.graphics.drawEllipse(clickPoint2.x,clickPoint2.y,30,30);```
Where grid1DrawArea is the 2d grid and grid2 is the isometric grid as seen in the image below.

Obviously this method does not work but can hopefully give you an idea of what I'm trying to accomplish. Another thing not helping is how the drawEllipse method works and a function to draw an ellipse starting from the center would help too.

Thanks for any help!

2. i know that you can make squares isometric by just rotating by 90 degrees and setting height to 50%, since circles dont need to be rotated try just scaling height to 50%

#### Posting Permissions

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

 » Home » Movies » Tutorials » Submissions » Board » Links » Reviews » Feedback » Gallery » Fonts » The Lounge » Sound Loops » Sound FX » About FK » Sitemap