-
Notifications
You must be signed in to change notification settings - Fork 12
A rotating scroll through
Benjamin Schmid edited this page Sep 15, 2020
·
1 revision
After the rotation, we want to scroll through the cornea while it is rotating around it’s z-axis. Scrolling through is implemented by adding the following lines:
From frame 90 to frame 450:
- change bounding box max z to 0
Note that we decrease the bounding box max z (and not increase min z) because we turned the cornea by 180 degrees.
For the rotation, we could just add another line right after:
- rotate by 360 degrees around (0, 0, 1)
However, this would apply the rotation after the 10-degree orientation adjustments in the beginning, i.e. rotate around the view’s and not the cornea’s z-axis. This looks a bit strange in combination with the scroll-through. Instead, the rotation is added at the beginning of the script:
From frame 90 to frame 450:
- rotate by 360 degrees around (0, 0, 1)
At frame 0:
- rotate by 10 degrees vertically
- rotate by 10 degrees horizontally
- change front clipping to -120
- change bounding box max z to 500
From frame 0 to frame 90:
- rotate by 180 degrees vertically
- zoom by a factor of zoom
From frame 90 to frame 450:
- change bounding box max z to 0
script
function zoom(t) {
return 0.6 - 0.3 * abs (sin (2 * PI * t / 180));
}
This is the entire script for the cornea animation. The result can be found here.