File Exchange

image thumbnail


version (2.09 KB) by Yuri K
Selects points on 3D plot using rbbox.


Updated 21 Mar 2005

View License

RBB3SELECT(X,Y,Z) returns logical array of points selected by rubberband box on 3D plot. Example script to outline the selected points is provided.

Cite As

Yuri K (2020). rbb3select (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (6)

Mario Koddenbrock

Yuri Kotliarov

Here is another longtimeago comment I found in my mailbox. Sorry I was not able to test it. But it may be useful for someone.


I was using your file RBB3SELECT to get coordinates of nodes from a 3D mesh. I previouly used SELECT3D (available in the FEX) but it can only return one data at time.

Your code works well except when it is used with CAMERA (cameratoolbar).

So, reading SELECT3D (from TMW), I found three non-documented properties of axes : x_RenderTransform, x_RenderOffset, x_RenderScale

I just change the line 34 from RBB3SELECT :
with this :

And it seems to solve the problem.
The test file RBB3TEST is still working even if you use the cameratoolbar.

I don't tested this modification more.
But it seems to enhance your contribution.

What do you think ?

Yuri Kotliarov

Sorry for not addressing problems for this submission for a long time. I found if you have axes with prospective mode turned on, the function returns wrong points some time.
So, I have 3 choices:
1) Check prospective mode and issue a warning
2) Force axes to prospective mode off just before selection
3) Somehow calculate projection even if prospective mode on. Currently I have no idea how to do it.
Any comments?

Ian D'Agostino

A great little utility. I also had problems getting the correct points. However, I was able to overcome this by always setting the axes to be uniform (n x n x n).
eg/ axis([-50 50 -50 50 -50 50 1 3]), where 1 and 3 are colour scaling.

Pontus Lindbom

It is good but when I am using vectors describing a point cloud the wrong points are chosen for some projections. Looks like incorrect projection or something.

Zoltan Sarosi

Very good! I was looking for it! Thank you!

MATLAB Release Compatibility
Created with R14SP1
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!