source:
proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/missing-data/random_scene_normal.m
@
37
Last change on this file since 37 was 37, checked in by , 14 years ago | |
---|---|
File size: 154 bytes |
Rev | Line | |
---|---|---|
[37] | 1 | function n = random_scene_normal() |
2 | p = []; | |
3 | while p == [] | |
4 | p = [(2*rand)-1, (2*rand)-1, rand]'; | |
5 | if sum(p.*p) > 1 p = []; end | |
6 | end | |
7 | n=p./(sqrt(sum(p.*p))); |
Note: See TracBrowser
for help on using the repository browser.