Rotation
A rotation is a geometric transformation that turns points or objects around a fixed point or axis by an angle while preserving distances and angles.
Geometry for Programmers
A rotation is a geometric transformation that turns points around a fixed center, axis, or origin while preserving distances and angles.
- How it is used
- Applies rotation as a common graphics and design transformation, then combines it with other geometric operations.
- How deep it goes
- Derives a 2D coordinate formula, reviews sine behavior, and develops homogeneous matrix composition through 3D extensions.
- Examples
- Uses rotated squares, a center-rotation composition, and a rectangle transformed by composed SymPy-style matrices.
- What you can do after
- Build it from scratch, apply 2D rotation formulas, and combine rotations with other transformations as one matrix.
CSS in Depth, Second Edition
A rotation is a geometric transformation that turns an object around a fixed point or axis.
- How it is used
- Uses rotation to change an element’s rendered orientation in static layouts, transitions, animations, and three-dimensional effects.
- How deep it goes
- Explains angle direction, units, axes, transform order, and document-flow consequences through a progressively modified card example.
- Examples
- Demonstrates rotated cards, negative angles, combined translation and rotation, and three-axis rotation diagrams.
- What you can do after
- Apply it via CSS transform functions, choose suitable angle units and axes, and diagnose unexpected movement caused by transform order.
Math for Web Design
A rotate transform is a CSS transformation operation that rotates an element around its transform origin.
- How it is used
- Applies geometric angles to CSS transforms, hover effects, cursor tracking, and rotary controls.
- How deep it goes
- Explains degrees, radians, centers, vectors, atan2, distance scaling, and angle normalization through frontend calculations.
- Examples
- Uses CSS rotate(), cursor-following arrows, grid-card hover tilt, and a volume knob with bounded angles.
- What you can do after
- Apply rotation via CSS and JavaScript, calculate target-facing angles, and build pointer-driven hover or dial interactions.
Deep Learning with PyTorch, Second Edition
A data augmentation transform that turns an image or volume around an axis, here constrained to the X-Y plane for CT data.
- How it is used
- Augments CT training candidates with controlled spatial variation while preserving their representative nature.
- How deep it goes
- Implements random 0–2π X-Y rotation with a 4×4 affine matrix, then resamples through PyTorch grid functions.
- Examples
- Uses a positive nodule sample and a runnable rotation branch that constructs a sine-cosine matrix.
- What you can do after
- Apply it via PyTorch affine_grid and grid_sample to rotate CT candidates during augmentation.
Read how Deep Learning with PyTorch, Second Edition explains rotation →
Build a DeepSeek Model (From Scratch)
A rotation is a geometric transformation that changes the orientation of a vector by a specified angle while preserving its length.
- How it is used
- Injects relative positional information into attention through position-dependent rotations of Query and Key vectors.
- How deep it goes
- Explains 2D geometry, trigonometric position shifts, and attention placement, but stops short of implementation details.
- Examples
- Uses unit-circle dimension pairs and the shift from position p to p + k to illustrate rotation.
- What you can do after
- Evaluate/understand how rotation encodes position while preserving vector magnitude inside attention.
Read how Build a DeepSeek Model (From Scratch) explains rotation →
Also covered in
- Building Quantum Software with Python
- Deep Learning with R, Third Edition
- Everyday Data Visualization
What to know first
- angleAn angle is a geometric measure of rotational separation between two rays, directions, or vectors sharing a common origin.
- coordinateA coordinate is a numerical value, or one component of an ordered set of values, specifying a position relative to a coordinate system.
- degreesA degree is a unit of angular measurement equal to one three-hundred-sixtieth of a full revolution.
- dimensionA dimension is an independent coordinate or feature axis used to represent points or data; the dimensionality of a representation is the number of such axes or components.
Related concepts
- cosine functionuses · The cosine function is a periodic trigonometric function that maps a real number or angle to a value between −1 and 1.
- color scaleconfigures · A color scale is a mapping from data values or categories to colors, often arranged as a continuous gradient or discrete set for visual representation.
- compositionused by · Composition is the construction of a larger behavior, computation, or system by combining smaller functions, components, or operations.
- sine functionuses · The sine function is a periodic trigonometric function that maps a real number or angle to a value between −1 and 1.
- 2d rotationincludes · A 2D rotation is a geometric transformation that rotates a two-dimensional vector by an angle while preserving its length.
- positional embeddingused by · A positional embedding is a numerical representation associated with an element’s position in a sequence and incorporated into its representation to convey position or order.
Questions about rotation
What is rotation?
A rotation is a geometric transformation that turns points or objects around a fixed point or axis by an angle while preserving distances and angles.
Which Manning books explain rotation?
Geometry for Programmers, CSS in Depth, Second Edition, Math for Web Design, Deep Learning with PyTorch, Second Edition and Build a DeepSeek Model (From Scratch).
What should I know before learning rotation?
Manning books that teach rotation usually introduce angle, coordinate, degrees and dimension first.
What kinds of rotation are there?
Kinds of rotation include 2d rotation.
What is rotation also called?
Rotation is also called rotate or ROTATING.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.




