Note that there are some explanatory texts on larger screens.

plurals
  1. POMeasure height of 3d block for [x y] point
    primarykey
    data
    text
    <p>I have following data:</p> <pre><code>kx = 20; ky = 20; k = [kx ky]; PointsL = [ [ 32 0 0] % P1 [387 0 0] [475 0 0] [475 30 0] [602 30 0] % P5 [602 220 0] [475 220 0] [475 737 0] [387 737 0] [ 32 737 0] % P10 [ 32 555 0] [ 0 555 0] [ 0 277 0] [ 27 277 0] [ 27 250 0] % P15 [ 0 250 0] [ 0 57 0] [ 32 57 0] % P18 ]; PointsH = [ [ 32 0 270] % P1 [387 0 270] [475 0 183] [475 30 183] [602 30 183] % P5 [602 220 183] [475 220 183] [475 737 183] [387 737 270] [ 32 737 270] % P10 [ 32 555 270] [ 0 555 270] [ 0 277 270] [ 27 277 270] [ 27 250 270] % P15 [ 0 250 270] [ 0 57 270] [ 32 57 270] % P18 ]; </code></pre> <p><code>PointsL</code> are points of the lower surface - all with <code>z=0</code>.</p> <p><code>PointsH</code> are points of the higher surface - changable in z-axis.</p> <p>All of them are representing points of room.</p> <p>Following code draws 3d model:</p> <pre><code>plength = size(PointsL,1); for i=1:plength if i == 1 pl1 = PointsL(plength,:); ph1 = PointsH(plength,:); else pl1 = PointsL(i-1,:); ph1 = PointsH(i-1,:); end pl2 = PointsL(i,:); ph2 = PointsH(i,:); line([pl1(1) pl2(1)], [pl1(2) pl2(2)], [pl1(3) pl2(3)]); line([ph1(1) ph2(1)], [ph1(2) ph2(2)], [ph1(3) ph2(3)]); line([pl1(1) ph1(1)], [pl1(2) ph1(2)], [pl1(3) ph1(3)]); end p1 = PointsH(2,:); p2 = PointsH(9,:); line([p1(1) p2(1)], [p1(2) p2(2)], [p1(3) p2(3)]); p1 = PointsH(4,:); p2 = PointsH(7,:); line([p1(1) p2(1)], [p1(2) p2(2)], [p1(3) p2(3)]); </code></pre> <p><img src="https://i.stack.imgur.com/wdtC0.png" alt="3d model"></p> <p>Is it possible to get height (<code>z</code> value) for given <code>x,y</code> values ?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload