-1

Now I want train a path loss model, and I have a map picture, and I want to convert this map into different views by the test location(x,y)

I need a conversion algorithm to produce a lot different map views by the test location.Now I can show a example of this(I am sorry this hard to describe)

in the left up is the map with 4 column,in the right bottom is the convert-new-map:

img

I want to use some "light resource"(the location A) to project onto the building in the map, then some light will be blocked, then we will get the shadow in this test location.

so the shadow from the AP location and test location can present the environment information in this area.

If you have some idea to solve this, please let me know. Thanks in advance

Cheng Hong

After discussing and googling, I find out that I should using some ray tracing technology for a 2D map.

In my research, I have two point, location A and location P in a map. And now I want to use ray tracing to convert the map combining the two locations into a new map view. In this new map view, the location A point is in the center, then some shadow will be added resulting from the building(call it black column) in the origin map. Then this new map is a kind of presentation or describer for the map and two location point. That is what I want to do.

Hong Cheng
  • 318
  • 1
  • 4
  • 19
  • Share your thoughts / research results. What have you tried so far? – MrSmith42 Apr 21 '17 at 11:29
  • sharing your mail on globally accessible page like this is just asking the bots to pick it up and misuse ... – Spektre Apr 21 '17 at 17:55
  • I need a new map to describe or present the information in the map with the two location points[And thanks for MrSmith42 and Spektre 's comment] – Hong Cheng Apr 24 '17 at 12:30

1 Answers1

1

you need to add more specs like the map is an raster image or vector? This has nothing to do with conversion (hence the retag) you just want to render your 2D map as 3D scene or its 2D slice (single horizontal line) this can be done really easily.

  1. raster map

    google Wolfenstein ray casting rendering techniques like:

  2. vector map

    construct mesh from your map and render by any 3D gfx api like OpenGL. To get started with this approach you need to grasp this:

    see also the sub-links in there ...

To implement the lighting condition you can implement any kind of shading. The easiest is normal shading. For more info see:

Community
  • 1
  • 1
Spektre
  • 49,595
  • 11
  • 110
  • 380
  • Thanks a lot for your kind answer. I think it helps a lot. And my professor said I should try some ray tracing algorithm. I have google some online video about the computer graphics about ray tracing, however, most of ray tracing are about the 3-D graphics. I need some demo or coding working with a 2D map. and in your question, Algorithm for 2D Raytracer is about it. Would you like to give me more advice about the 2D ray tracing? – Hong Cheng Apr 24 '17 at 12:04
  • Dear Spektre, I read the **Understanding 4x4 homogenous transform matrices** and **transform matrix anatomy**, for the 4*4 matrix, why should we add m[12]~m[15] that is (0,0,0,1) in the matrix? Can you explain more details for me ? – Hong Cheng Apr 25 '17 at 05:15
  • @HongCheng we are using 4x4 instead of 3x3 so we can stack up any number of transformations into single matrix .... 3x3 represent just rotation but in 4x4 you can have rotation + translation + projection at the same time . The last line `(0,0,0,1)` is for projections see [Perspective Projection](http://stackoverflow.com/a/24009436/2521214) or [OpenGL Projection Matrix](http://www.songho.ca/opengl/gl_projectionmatrix.html#perspective) – Spektre Apr 25 '17 at 07:22
  • @HongCheng here link to [Doom style 2D raytracer](https://stackoverflow.com/a/47251071/2521214) QA I answered some time ago... – Spektre Nov 28 '17 at 08:35