A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Convert Ellipse to Isometric

  1. #1
    Senior Member
    Join Date
    Jan 2003
    Location
    Nebraska
    Posts
    448

    Cool 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!
    Attached Images Attached Images
    ecards - My full flash site.

  2. #2
    Member
    Join Date
    Aug 2010
    Posts
    65
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center