Problem with Camera view and projection depth

3 views (last 30 days)
Hi, I am currently working on a project to create a view from different points of an object from its surface normal at that point and check whether another object is visible to that particular point. my code is as follow:
daspect([1 1 1]);
camproj perspective;
camva('auto');
set(gca,'renderer','zbuffer');
for i = 1:sizez(origin)
campos(origin(i,:)+0.01*direction(i,:));
camview(origin(i,:)+10*direction(i,:));
end
The results appear to be acceptable in most of the case; but some case would give me a result like this: <http://img228.imageshack.us/img228/9449/test11f1rsign.png>
I believe the problem is due to the aspect ratio. but when i set it to auto, the view is even worse. I dont want to adjust the aspect ratio one by one and I believe that must be a way out.
Any suggestion for that?
Thanks in advance.
Regards, Augustine Lee

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!