Question: Trying to perform dolly zoom effect on camera, where application is composed of Typescript (CPU) , Shaders (GPU) and Camera in typescript. Scene contains camera

Trying to perform dolly zoom effect on camera, where application is composed of Typescript (CPU) , Shaders (GPU) and Camera in typescript.

Scene contains camera and other objects.

We need to set correct camera properties in methods , since camera moves and zooms on dolly, their input will vary accordingly. Following are two taks to be accomplished I. 1. Centre the point the camera looks at 2. Camera Position, function returns (vec3) 3. Camera up Y-Axis of camera, function returns (vec3) 4. Cameras Vertical Field of View. function returns (number)

II. Cameras fov , function returns(GLFloat) , Receives as input distance from target (number) & Width (number). It should return (vertical) field of view of the camera based on the distance to the camera and the desired size of the focus area. Its important to take input distance and width as input. This returned value will be set in camera.ts of web-gl Operate.

This function will receive inputs like Focal Width, Max & Min Distance view Target(Interpolation factor is 1, better version of interpolation factor, Rotation (lat/long in radians ), view target(this contains scenes point of interest).

All in typescript . Camera class from webgl-operate is being used and is passed in this function.

Please provide necessary code (typescript).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!