Scaling so, that everythings on screen...

Hello !
Before the renderingprocess in my programmm i randomly generate up to 2000 points in space. They are represented as cubes.
How can i find out where the camera has to be positioned, so that all my Points are on screen and in the frustum respectively ?
thx

First you create a bouding-sphere, when you know the radius it’s pretty easy to find out the distance with a given field-of-view.

Sorry i’m noob… :-\

How can i compute a bounding sphere with the given data ?

Not that easy actually.

A quick-and-dirty solution would be generating a bounding-box (trival) and use that to make a bounding-sphere

the origin would be the center of the box
the radius would be: the distance from the origin to one of the box’s corners.