Products
Features
YouTube Video Summarizer
Summarize YouTube videos
Web & PDF Highlighter
Highlight web pages & PDFs
Chat with PDF
Ask any PDF questions with AI
Ask AI Clone
Chat with your highlights & memories
Audio Transcriber
Transcribe audio files to text
Glasp Reader
Read and highlight articles
Kindle Highlight Export
Export your Kindle highlights
Idea Hatch
Hatch ideas from your highlights
Integrations
Obsidian Plugin
Notion Integration
Pocket Integration
Instapaper Integration
Medium Integration
Readwise Integration
Snipd Integration
Hypothesis Integration
Apps & Extensions
Chrome Extension
Safari Extension
Edge Add-ons
Firefox Add-ons
iOS App
Android App
Discover
Discover
Ideas
Discover new ideas and insights
Articles
Curated articles and insights
Books
Book recommendations by great minds
Posts
Essays and notes from readers
Quotes
Inspiring quotes collection
Videos
Curated videos and summaries
Explore Glasp
Glasp Story
How we grew from 0 to 3 million users
Glasp Newsletter
Weekly insights and updates
Glasp Talk
Interview series with great minds
Glasp Blog
Latest news and articles
Glasp Use Cases
Learn how others use Glasp
Build & Support
Glasp API
Access Glasp's API for developers
MCP Connector
Connect Glasp to Claude & ChatGPT
Community
Glasp Reddit Community
Students
Student discount and benefits
FAQs
Frequently Asked Questions
AboutPricing
DashboardLog inSign up

9.3: More about Transformations - p5.js Tutorial

26.7K views
•
September 19, 2017
by
The Coding Train
YouTube video player
9.3: More about Transformations - p5.js Tutorial

TL;DR

Using push() and pop() in p5.js saves and restores style information beyond just transformation data.

Transcript

All right, so I'm going to make one more video here about transformations just to cover a few bases that I didn't get to. And some of this is unnecessary information. You could probably skip this one. But if you want to dive a little bit deeper into this, there's a few things about this. The first thing I want to say that's actually quite crucial a... Read More

Key Insights

  • 🫷 push() and pop() in p5.js handle both transformation and style information.
  • 🪈 Understanding the stack concept helps in managing the order of transformations in p5.js.
  • 🥹 The matrix in p5.js holds critical data for transformations like rotation, scaling, and translation.
  • 👻 A deep dive into applyMatrix() and resetMatrix() allows for advanced manipulation of visual elements.
  • ❓ The WebGL renderer in p5.js offers 3D rendering capabilities for more complex transformations.
  • ❓ Learning about transformations is crucial for creating dynamic and visually appealing graphics.
  • 🫷 The push() and pop() functions in p5.js follow a stack-based approach for transformation management.

Install to Summarize YouTube Videos and Get Transcripts

Explore YouTube Video Summarizer or Get YouTube Transcript Extractor

Questions & Answers

Q: What additional information do push() and pop() save and restore in p5.js transformations?

push() and pop() in p5.js not only handle transformation data but also save and restore style information like stroke weight, stroke, and fill attributes, offering a comprehensive solution for managing visual elements.

Q: How does the stack data structure relate to push() and pop() in p5.js transformations?

The stack data structure in push() and pop() functions ensures that the items saved are restored in reverse order, mimicking the last-in-first-out concept where the last transformation saved is the first to be restored.

Q: What role does the matrix play in p5.js transformations?

The matrix in p5.js transformations stores essential information like orientation, scaling, and translation in a structured format, allowing for precise manipulation of visual elements within the canvas.

Q: How do applyMatrix() and resetMatrix() functions contribute to transformation management in p5.js?

applyMatrix() in p5.js lets you apply custom transformation matrices, while resetMatrix() resets the transformation state to default, offering fine control over visual elements' orientation and scaling.

Summary & Key Takeaways

  • push() and pop() functions in p5.js not only save and restore transformation information but also style information like stroke and fill.

  • Understanding the stack data structure behind push() and pop() helps in managing transformations in p5.js.

  • The matrix in transformations stores orientation, scaling, and translation data that can be manipulated using applyMatrix() and resetMatrix().


Read in Other Languages (beta)

English

Share This Summary 📚

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator

Explore More Summaries from The Coding Train 📚

How to Create Fractal Patterns with Toothpicks thumbnail
How to Create Fractal Patterns with Toothpicks
The Coding Train
8.1: Fractals - The Nature of Code thumbnail
8.1: Fractals - The Nature of Code
The Coding Train
9.4: Genetic Algorithm: Looking at Code - The Nature of Code thumbnail
9.4: Genetic Algorithm: Looking at Code - The Nature of Code
The Coding Train
Coding Challenge #116: Lissajous Curve Table thumbnail
Coding Challenge #116: Lissajous Curve Table
The Coding Train
Computer Mouse Conference Demos! (node.js + tensorflow.js) thumbnail
Computer Mouse Conference Demos! (node.js + tensorflow.js)
The Coding Train
ITP/IMA Winter Show 2019 thumbnail
ITP/IMA Winter Show 2019
The Coding Train

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator

Apps & Extensions

  • Chrome Extension
  • Safari Extension
  • Edge Add-ons
  • Firefox Add-ons
  • iOS App
  • Android App

Key Features

  • YouTube Video Summarizer
  • Web & PDF Summarizer
  • Web & PDF Highlighter
  • Chat with PDF
  • Ask AI Clone
  • Audio Transcriber
  • Glasp Reader
  • Kindle Highlight Export
  • Idea Hatch

Integrations

  • Obsidian Plugin
  • Notion Integration
  • Pocket Integration
  • Instapaper Integration
  • Medium Integration
  • Readwise Integration
  • Snipd Integration
  • Hypothesis Integration

More Features

  • APIs
  • MCP Connector
  • Blog & Post
  • Embed Links
  • Image Highlight
  • Personality Test
  • Quote Shots
  • Open Graph Checker

Company

  • About us
  • Our Story
  • Blog
  • Community
  • FAQs
  • Job Board
  • Newsletter
  • Pricing
Terms

•

Privacy

•

Guidelines

© 2026 Glasp Inc. All rights reserved.