# ISSUE: Sharing Code for Digital Scene

**URL:** <https://forum.code.org/t/issue-sharing-code-for-digital-scene/24949>\
**Category:** CS Principles\
**Tags:** csd-unit-3\
**Created:** [February 19, 2019, 6:59pm UTC](https://forum.code.org/t/issue-sharing-code-for-digital-scene/24949 "2019-02-19T18:59:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![prelsha](https://avatars.discourse-cdn.com/v4/letter/p/57b2e6/32.png) [@prelsha](https://forum.code.org/u/prelsha)\
**Post date:** [February 19, 2019, 6:59pm UTC](https://forum.code.org/t/issue-sharing-code-for-digital-scene/24949/1 "2019-02-19T18:59:14Z")

</div>

**Shawn Prell**

Feb 19, 10:42 PST

My students are sharing code to create a digital scene.

Program [#1](https://support.code.org/hc/requests/1): This is the project which has all of the code. However, when it runs the Milwaukee Bucks Logo (see code in Project [#2](https://support.code.org/hc/requests/2) below) is distorted.

> **[Check out what I made](https://studio.code.org/projects/applab/7n7urYZ73RN_iatCUNH_zutSZ9dQkCjCr6-K9HPNkv4)**
>
> I wrote the code myself with Code.org

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

---

<div class="post-metadata">

**Author:** ![kaitie\_o\_bryan](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/kaitie_o_bryan/32/2278_2.png) [@kaitie\_o\_bryan](https://forum.code.org/u/kaitie_o_bryan)\
**Post date:** [February 20, 2019, 11:11pm UTC](https://forum.code.org/t/issue-sharing-code-for-digital-scene/24949/2 "2019-02-20T23:11:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![prelsha](https://avatars.discourse-cdn.com/v4/letter/p/57b2e6/32.png) [@prelsha](https://forum.code.org/u/prelsha)\
**Post date:** [February 21, 2019, 3:22pm UTC](https://forum.code.org/t/issue-sharing-code-for-digital-scene/24949/3 "2019-02-21T15:22:33Z")

</div>

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.](https://studio.code.org/projects/applab/7n7urYZ73RN_iatCUNH_zutSZ9dQkCjCr6-K9HPNkv4)

[Project - This is just the Bucks logo. This code was copied and pasted into the main project.](https://studio.code.org/projects/applab/5ckfRt1PGj--275Scnwdde9gGlExgOr9WG0V3tCiRyA)

---

<div class="post-metadata">

**Author:** ![bhatnagars](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/bhatnagars/32/4919_2.png) [@bhatnagars](https://forum.code.org/u/bhatnagars)\
**Post date:** [February 21, 2019, 6:33pm UTC](https://forum.code.org/t/issue-sharing-code-for-digital-scene/24949/4 "2019-02-21T18:33:51Z")

</div>

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

> **[Check out what I made](https://studio.code.org/projects/applab/GZpoY6R5hGiueTosF6AXfGMyRbvm2BXi3jscaHLkUDA)**
>
> I wrote the code myself with Code.org

---

<div class="post-metadata">

**Author:** ![kaitie\_o\_bryan](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/kaitie_o_bryan/32/2278_2.png) [@kaitie\_o\_bryan](https://forum.code.org/u/kaitie_o_bryan)\
**Post date:** [February 21, 2019, 10:00pm UTC](https://forum.code.org/t/issue-sharing-code-for-digital-scene/24949/5 "2019-02-21T22:00:43Z")

</div>

@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)) {  
bucksLogo();  
}

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!
