Here's what I have:
%plot original points
plot3(pts(1,:), pts(2,:), pts(3,:),'bo');
camproj(gca,'perspective')
%figure out the 2d projection of these points
[az,el] = view;
T = viewmtx(az,el);
tmp = T*[pts;ones(1,size(pts,2))]
%skip the rescaling because the 4th row is already 1
So, here's the problem - none of the resulting 2d points look anything
like what I get from ginput(1) and selecting a point.
Can anyone help me? btw - I'm running 6.1 r12 on WinNT.
Thanks,
Geoff
Thanks,
Geoff
Geoffrey Egnal (geg...@gradient.cis.upenn.edu) wrote:
: I'm trying to create a user interface where the user can select points
: Thanks,
: Geoff
--
Geoff
It seems that select3d only works on meshes/surfaces. Is there any
tool out there to select random 3d points on a 3d plot?
> It seems that select3d only works on meshes/surfaces. Is there any
> tool out there to select random 3d points on a 3d plot?
Geoff:
Getting SELECT3D to work with line objects is a little more tricky
that patch or surface faces because line width and marker geometry
is defined in pixel space, not data space. It can be done in m-code
though, it's just more work.
But I think your needs can be met if some basic assumptions
are made. A simple algorithm would be to find the closest
line vertex in 2-D view space relative to the selection point.
This would ignore width properties, but it might just meet
your needs.
When I get a chance, I'll update SELECT3D on MATLAB Central
for simple line object support.
I should point out that full 3-D selection support is the MathWork's
wish list, but I'm hoping SELECT3D will satisfy most needs in the
mean time.
Regradless, keep those enhancement requests coming.
Joe Conti
The MathWorks
Geoff
Joe Conti (jco...@madmax.mathworks.com) wrote:
: geg...@gradient.cis.upenn.edu (Geoffrey Egnal) writes:
: Geoff:
: Joe Conti
: The MathWorks
--
Geoff