Newton Quote with Dynamic Rectangles
Inspired by this animation?
1. Overview
- Title: A Quote from Newton ā displayed at the top of the scene.
- Main Visuals:
- A blueācolored quote by Newton surrounded by a yellow rectangle.
- A large "Hello World" LaTeX text surrounded by a roundedācorner rectangle.
- Purpose: Demonstrate grouping, surrounding rectangles, and coordinated animations (shifting and stretching) in a concise, visually appealing way.
- Total Duration: ~15āÆseconds (well under the 30āsecond limit).
2. Visual Elements
| Element | Type | Content / Parameters | Color | Size / Scale | Position | Notes |
|---|---|---|---|---|---|---|
title |
Title | "A Quote from Newton" | White (default) | default | Centerātop, slight upward offset (ā1.5 units) | Fadeāin over 1āÆs |
quote |
Text | "If I have seen further than others, | ||||
| it is by standing upon the shoulders of giants." | Blue | 0.75Ć original | Directly below title | Appear with a Write animation | ||
quote_box |
SurroundingRectangle | surrounds quote |
Yellow | default thickness | tightly wraps quote with a small buffer (MED_LARGE_BUFF) |
Fadeāin together with quote |
hello |
Tex | "Hello World" | White | 1.5Ć original | Initially placed below the quote group | Appear with a Write animation |
hello_box |
SurroundingRectangle | surrounds hello |
White (stroke) | corner radius 0.2 | tightly wraps hello |
Fadeāin together with hello |
group_quote |
VGroup | (quote_box, quote) |
ā | ā | ā | Arranged vertically, centered horizontally |
group_hello |
VGroup | (hello, hello_box) |
ā | ā | ā | Arranged vertically, centered horizontally |
all_groups |
VGroup | (group_quote, group_hello) |
ā | ā | ā | Arranged DOWN with default spacing, centered on screen |
3. Animation Sequence & Timing
- 0.0āÆs ā 1.0āÆs:
titlefades in (opacity from 0 to 1). - 1.0āÆs ā 2.5āÆs:
quoteis written (strokeābyāstroke) whilequote_boxfades in simultaneously. - 2.5āÆs ā 3.5āÆs:
hellois written andhello_boxfades in together. - 3.5āÆs ā 4.0āÆs: Short pause (hold the static composition).
- 4.0āÆs ā 6.0āÆs: Coordinated animation (all actions run in parallel):
group_quote's rectangle (quote_box) shifts up by 2 units and stretches horizontally to a width of 3 units.hello_boxstretches horizontally to a width of 8 units.group_hello(bothhelloand its box) shifts down by 2 units.- Use a smooth easeāout interpolation for natural motion.
- 6.0āÆs ā 7.0āÆs: Hold the final layout for emphasis.
- 7.0āÆs ā 8.0āÆs: Fade out all objects together (optional graceful exit).
- 8.0āÆs ā end:
self.wait()equivalent ā scene ends.
4. Camera & Perspective
- Camera: Fixed, orthographic view; no zoom or pan required.
- Framing: All objects remain within the default frame ([-7, 7] Ć [-4, 4]).
- Background: Plain dark (default) to ensure high contrast with blue, yellow, and white elements.
5. Transitions & Easing
- Use
FadeInfor title and rectangles,Writefor text elements. - For the coordinated shift/stretch, apply
run_time=2seconds withrate_func=there_and_backnot needed; a simplesmooth(default) works best. - Ensure that the stretch operations keep the rectangle centered on its original midpoint before the shift.
6. Additional Details & Corrections
- Grouping: The original code attempted to animate
mobjects[0][0](the rectangle) andmobjects[1][1](the second rectangle). In the specification we explicitly name these asquote_boxandhello_boxfor clarity. - Ordering: The
VGrouparrangement is performed after all individual objects are created, guaranteeing proper vertical stacking. - Scaling: The
quoteis scaled to 0.75, andhelloto 1.5 as in the original code. - Buffer:
MED_LARGE_BUFFis retained for the yellow rectangle around the quote to give a comfortable margin. - Corner Radius: The rectangle around "Hello World" uses a corner radius of 0.2 for a softened look.
7. Summary of Expected Visual Flow
- Title appears.
- Newtonās quote emerges with a yellow border.
- "Hello World" appears with a sleek rounded border.
- The quoteās border lifts and narrows, while the "Hello World" border widens, and the whole "Hello World" block drops down, creating a dynamic rearrangement.
- The scene holds the final composition briefly before fading out.
All timings are approximate and can be fineātuned within the 15āsecond window while staying under the 30āsecond maximum.
Created By
Description
The scene fades in a title, then writes a blue Newton quote inside a yellow rectangle and a large Hello World text inside a rounded white rectangle. Both groups are stacked vertically. Afterwards the quote rectangle moves upward and narrows while the Hello World rectangle widens and its group shifts downward, illustrating grouping, surrounding rectangles, and coordinated shift-and-stretch animations. The final layout holds briefly before fading out.
Created At
Jan 31, 2026, 04:01 PM
Duration
0:09
Tags
groupingsurrounding-rectangletext-animationanimation-techniques