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 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

7.7: Object Communication Part 2 - p5.js Tutorial

65.1K views
•
December 14, 2017
by
The Coding Train
YouTube video player
7.7: Object Communication Part 2 - p5.js Tutorial

TL;DR

This video explores how to test for overlaps between multiple bubbles using object-oriented programming techniques and nested loops.

Transcript

Hello. It is a bubble. In my previous video, which you may not have watched, I looked at how I could test if these two circles are overlapping. It's not just about the math to look at if circles are overlapping while that's interesting of course, the whole point of this was really to look at an object oriented sort of technique for how I might writ... Read More

Key Insights

  • 👁️‍🗨️ The video demonstrates the process of checking for overlaps between bubbles using an array and nested loops.
  • 👁️‍🗨️ Object-oriented programming techniques, such as creating bubble objects and using functions within the objects, simplify the coding process.
  • 👁️‍🗨️ The use of nested loops allows for the efficient checking of intersecting bubbles, though it can become computationally expensive with a large number of bubbles.

Install to Summarize YouTube Videos and Get Transcripts

Explore YouTube Video Summarizer or Get YouTube Transcript Extractor

Questions & Answers

Q: What is the main objective of this video?

The main objective of the video is to demonstrate how to check for overlaps between multiple bubbles using an array and nested loops in object-oriented programming.

Q: How can you check if a bubble intersects with any other bubble?

By using nested loops, you can iterate through each bubble and check if it intersects with every other bubble in the array. If an intersection is found, you can perform a specific action, such as changing the bubble's color.

Q: How can you optimize the process of checking for overlaps between bubbles?

One possible optimization is to introduce index variables (like "i" and "j") in the nested loops. This allows you to start the inner loop from the current position of the outer loop and avoid duplicate checks.

Q: Are there any limitations to the current implementation?

The current implementation becomes computationally expensive as the number of bubbles increases. This is because it uses an n-squared algorithm, resulting in a high number of computation cycles. Optimizations, such as binning or quad trees, can be used to improve efficiency.

Summary & Key Takeaways

  • The video discusses the process of checking for overlap between bubbles by using an array of bubbles instead of separate variables.

  • The video demonstrates how to create, display, and move bubbles using object-oriented programming techniques.

  • The video introduces the concept of nested loops and explains how to use them to check for overlap between every bubble in the array.


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 📚

Coding Challenge #126: Toothpicks thumbnail
Coding Challenge #126: Toothpicks
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
ITP/IMA Winter Show 2018 thumbnail
ITP/IMA Winter Show 2018
The Coding Train
ITP/IMA Winter Show 2019 thumbnail
ITP/IMA Winter Show 2019
The Coding Train
Computer Mouse Conference Demos! (node.js + tensorflow.js) thumbnail
Computer Mouse Conference Demos! (node.js + tensorflow.js)
The Coding Train
Coding Challenge #116: Lissajous Curve Table thumbnail
Coding Challenge #116: Lissajous Curve Table
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

Company

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

•

Privacy

•

Guidelines

© 2026 Glasp Inc. All rights reserved.