Away3d building an irregular Polygon as a plane - actionscript-3

I have a sprite which helps the user draw a custom shape? i want to tile the surface how can that be achieved?

Use EarCutting for Triangulation.
Convert your 2D points to 3D points for(Away3D).
Use the points to build custom Mesh.
Bingo!!
> The tricky part is to calculate the UV for the texture

Related

How do I estimate 3D position of an object in video?

I want to find a 3D position coordinates (X, Y, Z) of a moving object.
I have a training set of pictures (frames from video) with a known ground truth XYZ position of an object.
The goal is to detect the object in the the input video and draw overlay with bounding edges and XYZ coordinates in real time 30fps.
Video stream is captured from a single fixed camera. Camera axis are not aligned with a world coordinate system (it's tilted and rotated). There will be maximum one object in a frame.
Is there existing models that can do it? Where can i start from?

Is there a way to match coordinates from 2D sheets to 3D view for an item?

I work on forge viewer to display Revit converted files. I try to put points into 2D sheets view that I would then display into 3D view. (e.g. in revit red house sample file, from sheet "A-102 plans" to 3D view {3D} ).
Currently, I see only something like:
From 2D view:
Extract coordinates of point from 2D view relatively to item 2d-bouding-box
Convert these relative coordinates into a x,y,z ratio to the size of the item (plus solve from x,y,z, what are the 2 axes we see in 2D)
Into 3D view:
Get 3D bounding box of the item
Compute point position from previous info
Since coordinates are different between the 2 views (which sounds expected), is there a more straightforward way to do this?
Thank you,

Get 2D location from 3D point

I have a THREE.Vector3 with location x, y, z of a mesh in the viewer. How can I get a corresponding 2D point on canvas? I would like to place something x, y at the same location where the 3D model is located in the viewer.
Check the worldToClient(point) method (part of Autodesk.Viewing.Viewer3D), the point parameters is a THREE.Vector3 point in world space coordinates. Below is a piece of the documentation.
Calculates the pixel position in client space coordinates of a point
in world space. See also clientToWorld().

Using Matrix in BitmapData.draw()

I need to draw a BitmapData into an other one and the result should be a tile formed by 4x the source at 1/4 the size.
Right now I am using 4 calls to BitmapData.draw() with a matrix to scale down the source and a clip rectangle to draw in each corner, but I'm wondering if the same result could be achieved with a single draw call.
Thanks
Thomas

Creating a world map scene with cubes in 3D? (WebGL, Three.js, Canvas)

I would like to create a world map in 3D perspective like this, including the shadow:
http://www.google.com/zeitgeist/2012/#explore
(Please wait 3 seconds for it to animate to its position)
On top of the world map, I would like to place simple red cubes (also casting shadows) instead of the markers in the above example.
What web standards/frameworks would you use?
In pseudo code, how would you achieve the above?
You can do it with pure webGL, but if you wanna code it fast than Three.js
create plane
apply world map texture
pixel-shader displacement for country shapes and shadow
red cubes
render shadow map for directional light and apply it to plane