SET CAMERA VIEW This command will set the viewport of the camera.
Syntax
    SET CAMERA VIEW Left, Top, Right, Bottom
    SET CAMERA VIEW Camera Number, Left, Top, Right, Bottom
Parameters
    Camera Number
Integer The camera number
    Left
Integer The left side of the camera position on screen
    Top
Integer The top of the camera position on screen
    Right
Integer The right side of the camera position on screen
    Bottom
Integer The bottom of the camera position on screen
Returns
This command does not return a value.
Description
The viewport is the actual area on screen where all 3D is drawn. The default viewport area is the entire screen, but can be specified using this command. You must specify the screen coordinates using integer values.
Example Code
    autocam on:backdrop on

    make matrix 1,4000,4000,100,100

    set matrix height 1,50,50,500

    update matrix 1

    make camera 1

    position camera 1,0,500,500

    point camera 1,2000,0,2000

    set camera to image 1,1,128,128

    fov=45:range=1000:size=0:aspect=screen width()/screen height()

    point camera 0,2000,0,2000

    while mouseclick()<>1

    paste image 1,0,0

    set cursor 0,0

    print "a-z Field-Of-View Angle ",fov

    print "s-x viewing range of the camera ",range

    print "d-c viewport of the camera ",size

    print "f-v Aspect Ratio ",aspect

    if inkey$()="a" then fov=fov-1:if fov<0 then fov=0

    if inkey$()="z" then fov=fov+1

    if inkey$()="s" then range=range-1:if range<0 then range=0

    if inkey$()="x" then range=range+1

    if inkey$()="d" then size=size-1:if size<0 then size=0

    if inkey$()="c" then size=size+1

    if inkey$()="f" then aspect=aspect-1:if aspect<0 then aspect=0

    if inkey$()="v" then aspect=aspect+1

    set camera fov 0,fov

    set camera range 0,1,range

    set camera view 0,size,size,screen width()-size,screen height()-size

    set camera aspect 0,aspect

    endwhile

    while mouseclick()=1 : endwhile

    delete matrix 1:autocam off:backdrop off

    end
See also
CAMERA Commands Menu Index