CS Encryption Project(via Snap)

Link to project: https://snap.berkeley.edu/snapsource/snap.html#present:Username=wumian&ProjectName=Encoding

In this CS project, our objective is to create a system of code that automatically encrypt a message and alert it on the browser, and the other people can copy it directly to another system of code which decrypt the message and alert it as well.

One of the encryption method is Caesar Cipher, where the unicode of the letters(a system of numbers given to represent everything on the keyboard. for example, letter “A” is 65 in unicode and letter “B” is 66) was shifted by a certain key(value).

However, when I was coding, I found out that it is very inconvenient to send out a message that contains a encoded part and a key, so I developed my own method.

In this method, I took the unicode of the message’s last letter as the “key” for shifting the unicode of the whole message. I used the scan method to get the unicode of the first letter in the message, change its unicode value by the key, and then store the letter of this new unicode in a strong. After I finish scanning all of the massage except for the last letter, for the convenience of decryption, I would put the last letter in front of the whole encrypted message. This way, it is relatively harder for people to interpret the encoded message, and easier for the user, since they don’t have to come up with a key and remember it.

However, after I finished coding, I found two problems:

First of all, because the unicode of the key is from 97 to 122 for lower case letters, so if I encode by adding the unicode of the key, it will be to large. In the end, I used the {rounded vale of [(1/10 of the last letter)’s unicode]} as a key, so that it won’t be too large.

Then, I faced another problem: because the maximum unicode is 122 for lower case “z”, and theoretically, the maximum encryption would be (122)/10 = 12. So if I’m encrypting any lower case letter with the unicode value larger than 122-12=110, I would get a unicode with no corresponding letter, making it impossible to encode and decode. Instead, I used a scan method to change the shift of any letter that’s after n (unicode 110) to -46, so those letters would become captions. For example, a “o” would became “A”, and “u” would became “G”.

Final Project:


In the last part, I was working on the encryption and decryption of spaces. I’ve been trying to replace spaces with letter “Z” using a scan method, but so far it is not working. I might want to keep working on this in the future.

Analysis on Turtle Art Drawing



Part One: Analysis of Turtle Art Gallery Art Piece

For the analysis and recreation of Turtle Art, I chose the drawing Spires from the Turtle Art Gallery. In order to remake the drawing, I have to decompose it and analyze it first. In this drawing, there are two main components/sub-procedures: the back ground and the spires.

Because the Spires is “on top” of the blue background (the other way to see it is that you can’t see stars on top of the Spires), the sequence of this drawing should be CLEANà BACKGROUNDàSPIRES.

The background include a FillScreen block to filling the whole screen with a deep blue color around 70. Then, I can draw the stars. First of all, because the stars were different sized, so I can use a random block to set a random pen size each time I draw a star. Then, to make the stars spread out randomly, I can use repetition block to assign random x and y-values.

Because the spires on the right always covers up the spires on its left, so I can assume that the whole roll of spires can be drawn from left to right by using a repetition block.

The most interesting part of this drawing is how each individual spires is drew because there pattern, sizes, even shape in some extend are different from each other. Because an individual spire contained multiple circles, I could assume that an individual spire can be drawn by using an incrementing pattern on pen size from the top to the bottom, and a random shading to make them black, white, and grey. Then, a repeat block is used to set a random X and Y-value for the top of the spires, and drew them from the left side to the right side of the screen.

Part Two: Recreation of Art Piece

In this part, I remade the art piece Spires from the Turtle Art Gallery with some adjustments. First of all, I changed the incrementing pattern of each individual Spire. Because personally I dislike how the bottom of the original spire looks to “fat”, I limited the size of the spires by setting the pen size randomly between 5 and 30.

Then, I set a random color pattern to my creation, and I found out that the colors are too random. So I used an increment block instead of a random block, and I found out that if I increased/decreased the color a bit from the original color when drawing each circles, the color would look less random.

Because the final product looked like coral reefs, I decided to add some bubbles on the back ground to make the drawing looks like an under-sea world. I added a circle with random sizes, random color and random shadings limited in a set range to display bubbles, and it worked out pretty well. Then, I used repetition block to duplicate the circles with random X and Y-values for 90 times, so that it will randomly fill the screen.

Part Three: Inspirations and Plan

I recently found the drawing ­­­­The Great Wave off Kanagawa by Japannesse artist Hokusai in the 1830s. I really like the way ­­­Hokusai drew the waves, and I would like to make some adjustments and recreate part of this drawing.

(Block Sky, Block Cloud)First of all, I divided the drawing up to two parts and made separate adjustments. The first part of the drawing is the background, or the sky in the far end of the drawing. I would first fill the screen with an orange color around 15 and give it a dark shading, and then I would make some adjustments and add the clouds. Because I can’t make the complexed shaped cloud on the back, I would use random and repetition blocks to drew another kind of cloud that’s often seen in many traditional Japanese drawings. (add a pic)

Afterword, I would focus on drawing the two kinds of wave shown below.

The first one(the one on the left) would be on the lower side of my drawing, covering my drawing in the lower and the middle right part of the drawing. It would contain two kinds of lines to display the waves in the original drawing, and the white part on the top to display the white tip of the waves in the original drawing. The second one(the one on the right) would be on the back of the first one, displaying the very small, flower like parts of the wave.

(Block Wave 2)First of all, I’ll drew the second type of wave, because it’s on the back of the first type of wave. I will drew some lines on an arc like shape filled with light blue color. On the type of those waves, I’ll drew the flower like parts of the wave.

(Block Wave 1)For the first kind of wave, there are a deep blue color and a light blue color, so I will fill an area with light color and drew deep blue lines using the arc block to represent the waves. For the white tips of the wave, I will drew triangles with arc as sides.

Part Four: Final Product and Reflection

In my final product, I only completed the first kind of wave and the clouds on the background. This is partially because I spent too much time on trying to drew the white tips using a random pattern, but continually failed to do it. I did finished my background and the clouds on it, and it looked ok to me.

One of the many struggle I faced is how to fill a shape. Originally I thought to fill a shape you have to draw a closed-up figure with no opening sides. So I ended up spending the majority of the time trying to figure out a way to try to drew the triangular light blue shape on the background, since I need to tell the turtle to go forward exactly how many step to drew the hypotenuse side, and Turtle Art contain demoes. Then, I find out Turtle Art can automatically complete the shape and fill it. This really made me feel very bad at the end of the day.



Wumian One Day Project. Clash Royale Figures. 2017

This is our One Day project: 3D printed Sparky and The Log–two legendary card in the game–Clash Royale,


I believe if we do the whole project over again, I will design all the part of our models first, and then we will have more time to put them together, finalize them, and maybe color them.

We also need to measure more carefully on Tinkarcad, because some of our part can’t connect to each other.