Dynamically adjust the contour datum ?

Home Forums AR Sandbox Forum Dynamically adjust the contour datum ?

This topic contains 8 replies, has 3 voices, and was last updated by  Oliver Kreylos 3 years, 3 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #101770

    Ross
    Participant

    Hi all
    I’m still waiting for parts so don’t have the benefit of a sandbox to play with.

    I would like to be able to adjust the contour datum dynamically. I wish to be able to demonstrate the change of contour shape as a function of where the contour actually cuts the terrain. Having seen billberets successful usb buttons and keyboard hacks for rain, drain and colours. I hoped to be able to use either a function key/ up down arrow combination or by programming the combination to two switches as in the usb switch device.
    I’m thinking if the calibrated contour spacing is around 7.5 mm in a standard setup then Incrementing and decrementing 10 X 0.75 mm steps would be sufficient.

    My question is, Would this be possible through a configuration value that would not cause problems for the rest of the calibration?
    Thanks for any input.

    • This topic was modified 3 years, 3 months ago by  Ross.
    #101784

    maphew
    Participant

    If I read this correctly, you wish to modify the contour interval on the fly, making the lines appear denser and close together or spaced farther apart dynamically?

    This might be possible with sarndbox v1.6 and the new Control Fifo named pipe, see http://lakeviz.org/forums/topic/minor-software-update/

    #101796

    Ross
    Participant

    Thanks maphew, I’m at 1.6 already so I’ll check out the software update features on your link.

    #101798

    Ross
    Participant

    Reviewing my question re datum shift

    I guess with such a small incremental change in the depth measurement it will depend on the resolving capability of the Kinect. One of the applications is to show the impact rising water levels in a Loch has on the outline shore of an island.

    http://shag.btck.co.uk/ a gif

    The contour spacing determines the vertical resolution but it must be possible to set the start point, i.e. the first contour at a specific elevation above the sandbox floor. I’m trying to understand what the stepwise increment of that adjustment is.

    Many thanks

    #101818

    maphew
    Participant

    For the contour lines themselves there is the -cls the command line option, though the 1.6 update post doesn’t list that among the parameters that can be updated through the fifo pipe.

      -cls <contour line spacing>
         Sets the elevation distance between adjacent topographic contour
         lines in cm
         Default: 0.75

    For my box values smaller than 0.3 or 0.4 are counter productive because it darkens the image too much.

    All is not lost though, because the colors (a.k.a. hypsometric tinting if you come from a cartography background) can be adjusted dynamically:

    echo "colorMap /path/to/etc/SARndbox-1.6/Custom-HeightColorMap.cpt" > /path/to/sandbox/Control.fifo

    Where the colormap file appears to be tab/space delimited “cm-from-camera red green blue

    -40.0    0   0  80
     -0.75  24 140 205
      0.25  16 122  47
      2.5  232 215 255
     14.0  161 161 161
     25.0  255 255 255

    Start sandbox from a terminal window (not a desktop shortcut) until the kinks are worked out.
    At first I thought it didn’t work, but was missing an error report from the terminal: ‘Cannot read height color map ~/etc/SARndbox-1.6/xxx-HeightColorMap.cpt due to exception IO::StandardFile: Unable to open file ~/etc/SARndbox-1.6/xxx-HeightColorMap.cpt for reading due to error 2’. It turns out that home path expansion, ~ –> /home/username, doesn’t work and that a full path is necessary.

    #101819

    Oliver Kreylos
    Keymaster

    There is currently no code to change the contour line offset in the code. There is the ability to change color maps on-the-fly that maphew pointed out.

    That feature might work better for your purpose, but will require some work. To show the effects of water level changes, you could create a series of color maps that are identical in the high-elevation parts, but cut from dry land color to blue at different elevations (and the granularity of those changes is entirely up to you). By dynamically switching between those, you can raise or lower the apparent water level. The nice thing is that the changes won’t affect dry parts of the surface at all, so it will look much nicer. If you offset contour lines, or change the base elevation plane, everything will change, which might bury the changes you want to show.

    Changing the base plane would be a pretty simple feature to put in, though.

    #101823

    Ross
    Participant

    Hi Oliver and Maphue Thanks for that I’ve tried out the colour map with an editor and it is quite flexible. Though I am having problems with the pipe’
    I Type this in a terminal: ~ $ echo “colorMap /home/serendipity/src/SARndbox-1.6/ect/SARndbox-1.6/C-HeightColorMap.cpt” > /home/serendipity/src/SARndbox-1.6/share/SARndbox-1.6/Control.fifo
    The terminal stays open no error message but the colormap is not updated – also trying to verify the content of Control.fifo does not open with text editor. (timer spins)

    • This reply was modified 3 years, 3 months ago by  Ross.
    #101824

    Ross
    Participant

    Hi Oliver, I have looked at a few ways of demonstrating the changes in contour height. Using water to reduce island outline works but does not make the understanding any easier I have also looked at the mechanical method of increasing the physical elevation by adding more sand and that works but is is not easy to reduce then reduce the elevation afterwards back to the same points and because of the explanation required, it again can be confusing for those new to contours. So if you don’t mind I will add dynamically adjusting the datum to the wish list for the new revision.
    Thanks

    #101826

    Oliver Kreylos
    Keymaster

    Might be due to HTML formatting. On the command line, check that you’re using a greater-than sign (>) to direct output from the echo command to the pipe.

    SARndbox should print an error message to its console when it doesn’t understand a request on the pipe. Do you get anything?

    Lastly, you cannot print from a pipe, or open a pipe with a text editor. It’s a one-way communication pathway, in this case into the SARndbox program.

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.

Comments are closed.