ISSUE: Sharing Code for Digital Scene



Shawn Prell

Feb 19, 10:42 PST

My students are sharing code to create a digital scene.

Program #1: This is the project which has all of the code. However, when it runs the Milwaukee Bucks Logo (see code in Project #2 below) is distorted.

Email me with any questions - thank you! Shawn Prell,608-512-5200


Hi @prelsha,

I cannot see your links for #1 and #2. Can you share the project URL? It is hard to tell what the students are trying to do with the logo - I see a function that is for the logo, but I don’t know what they want it to look like.

Can you give a bit more context?

Thank you!


Thank you for your help KT! Here are the two project links:

Project - This is the main project link. It includes the basketball court and logo.

Project - This is just the Bucks logo. This code was copied and pasted into the main project.


I see that the problem is in the use of the turnRight method. If you comment that, the logo is not distorted any more. Also I added a turnTo(0) to position the pen to the right direction in the bucksLogo function. Here is the modified code. The lines I modified are marked with <<<<<<<<<<<<<<<<<<<<<


@prelsha it looks like @bhatnagars has one solution.

In your first link (The “main project link”) I took out the lines of code starting at 29 with the conditional statement.

if (penRGB(0, randomNumber(0,255), 0, 1)) {

Since “penRGB(0, randomNumber(0,255), 0, 1)” does not evaluate to true, the code on line 30 (bucksLogo(); ) does not run. If you remove line 29 and 31 it works well for me!