Wonky Wheels

Wonky Wheels

by Dinosu

šŸ‘ 1,179 ā¤ļø 137 ⭐ 111 šŸ”„ 1
Created: May 14, 2022 Last modified: May 30, 2022 Shared: May 14, 2022

Instructions

āš ļø Too slow? Run the project on Turbowarp: https://turbowarp.org/690349930 Paste your save codes here: https://scratch.mit.edu/discuss/topic/604485/ ------ Instructions (also in project) ------ 1. Draw a wonky wheel shape between the two dashed rings, or load one of the examples. 2. Click and drag your mouse slowly across the dashed horizontal line, and then press "Generate." Watch as your wheel runs smoothly on a strange road! Generate a save code if you like! ------ Experiment ------ What happens when you try these shapes? - Long rectangle - Oval/ellipse - Random squiggle ------ Guide for remixers ------ - The broadcast event "get road" occurs when the user presses "Generate." - Most of the variables are set in the "get wheel" sprite. - The variables that do not change throughout the project are denoted in all capital letters. - "WHEEL CENTER X" and "WHEEL CENTER Y" are variables that define where the wheel is shifted. For instance, if you wanted the road to be high on the screen, you would set "WHEEL CENTER Y" to a large number. - The "axis" sprite is simply the black dot in the center of the wheel. - The "clouds" sprite is pretty self-explanatory if you want to add to it or remove it. ------ Math explanation ------ This is how the project works: 1. User creates a drawing. Some points in the drawing are stored in a list in which each index is the angle from the center of the wheel to the point, and the item at the index index is the distance from the center to the point. This is known as "polar coordinates," based on a radius and angle. 2. The project uses linear interpolation to smooth the user's drawing and fill in any gaps that weren't detected in the drawing stage. 3. The project "unravels" the user's wheel drawing in order to form a road that it will roll smoothly on. Specifically, each value in the list of radii of the wheel are subtracted from the height of the wheel's center so that the new point just skims the outside of the wheel. 4. The wheel is rotated by taking the first item of the list, appending it to the end, and then deleting the first item. ------ Credits ------ Thanks to @colinmacc for the suggestion to include save codes! Thanks to https://i.imgur.com/tpQa868.jpg for the formula I used to load the example polygons (polar equation for an n-gon).

Project Details

Visibility
Visible
Comments
Enabled

More Cool Projects

Project thumbnail
View Project

Plants vs. Zombies (PVZ) V1.4 remix

by deltatale141321

Project thumbnail
View Project

beat up elmo

by Draven1205

Project thumbnail
View Project

Number Blocks 1-20 Incredibox

by BENJAMIN10A

Project thumbnail
View Project

beat up greg heffley football

by incredibleguy_67

Project thumbnail
View Project

Blue Mist Plus - Latest Infcycleone thousands Jumpscares remix copy copy copy copy copy copy c… copy

by JMG3000

Project thumbnail
View Project

Sesame street Elmo's world hands wild wild west version fixed!

by 13and14plus15

Project thumbnail
View Project

MYO: Total Drama Action

by StylishOlivia

Project thumbnail
View Project

(1+1ļ¼‰ć‚Æćƒ©ć‚¹å…Øå“”ć‚’å·»ćč¾¼ć‚“ć ć‚¢ćƒ³ć‚±ćƒ¼ćƒˆļ¼ļ¼

by ibukia

Project thumbnail
View Project

Ads.

by Xx-spider_wick-xX

Project thumbnail
View Project

Beat Up Troll Face

by robloxoff87

Project thumbnail
View Project

Coding 1a

by vincentl1

Project thumbnail
View Project

Friday Night Funkin' Tails Gets Trolled | No Villains

by CharizardAaroshdude

Project thumbnail
View Project

Abstract - A Cloud Scrolling Platformer (Server 1)

by wolfnet

Project thumbnail
View Project

☁ Capture the Flag (Online)

by sceptile100

Project thumbnail
View Project

Deeper The Dungeon v1.4.2

by Collin_The_Newmaker

Project thumbnail
View Project

beat up mr dweller but it's low quality v9

by REKT_DDDDDDDDD

Project thumbnail
View Project

Sonic Before the Sequel EXPANDED 2022 SAGE

by kakeaaron

Project thumbnail
View Project

Spongebob Jetpack (V.1.1) Alpha Build

by Cryptierz

Project thumbnail
View Project

Barney error maker Bestboy087 Edition

by toodles867

Project thumbnail
View Project

å¹»ęƒ³éƒ·ć‚¢ćƒ•ć‚æćƒ¼

by Tokoyo_mituki

Project thumbnail
View Project

Fnwmt Sprite Pack

by Jonabren

Project thumbnail
View Project

My talking Angela 2 remix

by PlanetCocukYediYasve

Project thumbnail
View Project

Minion Clicker 2

by bennyson3123

Project thumbnail
View Project

Yeardateblocks Band 7009

by yeardateblocksband