Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   Programatically generating contour map in Unity 3d over a flat surface (https://www.warriorforum.com/programming/936939-programatically-generating-contour-map-unity-3d-over-flat-surface.html)

ate8tree3 12th May 2014 01:20 AM

Programatically generating contour map in Unity 3d over a flat surface
 
Hi!

I am working on a project in Unity3D in which I have to Generate a contour map from data obtained from formulas separately over a flat surface.

I have a simple 2d surface rotated in 3d. Imagine a surface such as this:
Code:

. . .
. . .
. . .

I want to generate (not just apply texture of a) contour on this surface on the basis of temperature data at different points on it. This not permanent and recalculation of data will show new contours. Data of temperature will be problematically created from formulas like this:

Code:

34 54 79
56 80 108
89 110 120

Is there a way to do this?

Please note that I want to generate the contour on the surface instead of creating it by hand. There is no need to find the contours or detect them because data for contours it will be found separately using formulas. I am ok with JS as well as C# code. But any help in getting the desired result/method would be very helpful.
I hope my question was clear enough :)

SteveJohnson 12th May 2014 08:21 AM

Re: Programatically generating contour map in Unity 3d over a flat surface
 
:D - if you look at the types of questions discussed here in the programming section of the WF, you'll find that this isn't the proper site to be asking your kind of questions. Might be better off to ask on StackExchange

ate8tree3 12th May 2014 10:52 AM

Re: Programatically generating contour map in Unity 3d over a flat surface
 
Well I am hoping that someone with any knowledge about my question might drop by and share some knowledge :)

Valdor Kiebach 12th May 2014 11:22 AM

Re: Programatically generating contour map in Unity 3d over a flat surface
 
Have you asked on the unity forum?
Scripting

I am not sure what you mean by contour, is it the line joining points of the same temperature just as height contour lines on a map do, if so are you asking how to draw these lines between points?

This would need a discussion in the unity forum, people need to know if you are using unityscript C# or boo.

I can share some knowledge but it will be better to have input from other Unity users too, also I only use C#.

ate8tree3 12th May 2014 01:25 PM

Re: Programatically generating contour map in Unity 3d over a flat surface
 
I need something like this: http://www.silvaco.com.cn/products/t...ress_fig3b.jpg

Here, the temperature is known at different locations and is represented by different colors.

heslil 20th May 2014 02:38 AM

Re: Programatically generating contour map in Unity 3d over a flat surface
 
Your question still seems unclear. You want to know how to generate a texture from the data you have (the formula) in Unity? As you said you know the contours so all it takes is first discretize the data then fill in the matrix which will be used as the texture of your mesh.


All times are GMT -6. The time now is 06:59 AM.