Is a Fated Encounter Real? Discover the Signs Here!

Date:

Share post:

Okay, so I wanted to mess around with this whole “fated encounter” idea, you know, like when two things are just meant to collide. I figured I’d try to make it happen with code, because why not?

Is a Fated Encounter Real? Discover the Signs Here!

The Setup

First, I needed something to represent my “entities.” I kept it super simple – just plain old circles. I thought about giving them names, like “Bob” and “Alice,” but decided to stick with numbers. Easier to keep track of, right?

The “Fated” Part

So, I had a basic setup and now i will start my project

I created a blank canvas on my screen. Think of it like an empty stage where the magic will happen.

  • I whipped up a quick function to draw my circles. Nothing fancy, just enough to plop them onto the canvas.

i created a new “do” function and defined the number of my circles.

This is where it gets interesting. I didn’t want them to just randomly bump into each other. I wanted it to feel, you know, destined. I started my code

Is a Fated Encounter Real? Discover the Signs Here!
  • make for loop.
  • set the position, be carefull about border.
  • assigned each circle a random direction.
  • Used random color to make it cool.

After that, i have some circles with random attribution!

  • I implemented a super basic collision check. Basically, if the distance between two circles is less than the sum of their radiuses, BAM! Collision.

Making it Move

i have some code can run, let them move, i implemented those:

  • Added some random movement, update position for each circle.

I set up a loop. now i can see them move and encounter each other. it just felt right. Cheesy, I know, but satisfying.

The Result

It’s nothing groundbreaking, obviously. Just a bunch of circles bumping into each other. But the whole process of building it, from the initial idea to seeing it play out, that’s what I enjoyed.

It’s like, I took this abstract concept of a “fated encounter” and turned it into something I could actually see and tweak. And yeah, maybe I’m reading too much into it, but it’s kind of cool, right?

Is a Fated Encounter Real? Discover the Signs Here!

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Related articles

Celtic 23-24 kit prices compared? (Save money with buying hacks)

So last week I decided I absolutely had to get the new Celtic home kit for this season....

Lakers Courtside Season Tickets How to Buy Your Own Seat Step-by-Step Guide

The Whole Journey to Get Courtside Seats Okay, so I’ve been obsessed with the Lakers forever, right? And sitting...

即时性需求引导专业报告资源(18词)

So the other day I was scrambling to find reliable industry reports for my consulting gig, hitting dead...

Best Jung Ki Ho Movies and Shows Find His Hits List

My Jungle of Jung Ki Ho Research Okay so last night I’m scrolling, right? Saw someone mention Jung Ki...