NOC – Week10: Autonomous Agents – Jingyi Zhu

Predators and Preys

Link: sketch, fullscreen

Date: 04/23/2019

For this week’s assignment, I explored predator-prey interactions with autonomous agent. The predators detect preys and try to catch them, while the preys detect the predators and try to escape. The preys have three states – free, being eaten and dead. When the preys are dead, they will be removed. The predators also have three states. When the state is “full”, the predators don’t chase after the preys. When the state is “hungry”, the predators only go after the free preys. When the state is “so hungry”, the predators chase after the nearest prey regardless of the state of the prey. 

A predator’s state is determined by a number which decreases continuously and increases when the predator eats a prey. The original size of the prey is added to the number once the size of the prey becomes zero. The problem is to update increase the number while the size of the prey is decreasing. When a predator is eating a prey, both the predator and the prey stop regardless of any interaction with other autonomous agents.

Users can press the mouse to set obstacles which only allow preys to go through. I have difficulty letting the predators check the boundaries of rectangular objects, so I only used circular boundary detection.

NOC – Week9: Particle System – Jingyi Zhu

Date: 04.16.2019

Link: sketches, fullscreen

For this week’s assignment, I made a sketch of four particle systems of polymorphic objects. The particles are generated at the four corners with an initial acceleration and are attracted by the mouse. When the mouse is pressed, the particles pause and are repelled by the mouse. The squares will rotate when the mouse is pressed, and the size of the circles will oscillate.

One problem I had was passing the right parameters to translate(). Since the origin is translated once when constructing the systems, the position of the mouse also need to be adjusted to the systems’ origins.

Another problem I had was that the calculation of the movement of particles was too heavy for my laptop. To prevent my laptop from overloading, I added noLoop() to exit the draw loop after a certain number of frameCount.

NOC: Midterm Project – Jingyi Zhu

Link: sketch, full-screen

Date: 04.03.2019

Idea and Concepts

My project idea is to simulate a planetary system and the slingshot effect of space probes by using forces in p5. I am inspired by the interesting trajectories of successfully launched space probes such as Voyager and I am interested in learning and implementing the physics behind.

I simulated the planetary system with simplified and idealized models, not considering friction on the planets. The physics concepts that I use are gravitational attraction, circular motion, centripetal force, Roche Limit, escape velocity and the third cosmic velocity. The sketches below are related formulas and computations. Continue reading “NOC: Midterm Project – Jingyi Zhu”

NOC – Week 6: Forces(2) – Jingyi Zhu

Link: https://editor.p5js.org/jz1111/present/m-utJ5G5_

Date: 03.26.2019

For this week’s assignment, I created particles in two environments. My goal is to create a smooth and comforting visual effect with attraction and collision. The particles are affected by stronger friction in the outer environment. They are affected by weaker friction and attraction of the mouse in the inner environment.

The particles are release with a small acceleration, so they are still at first. If multiple particles are generated closely enough, they will fiercely repel each other and make the effect of blasting. The particles repel each other slightly, so they move slowly outwards. Upon collision, the particles will exchange colors, which creates a flickering effect.

Wind is applied when the key board is pressed. The particles are blown upwards.

I wanted to constrain the particles in the environment where they are generated, but I wasn’t able to fix the problem of applying forces and positioning when particles collide with the edge. Interestingly, the visual effect without collision with the edge is more comforting.

CPD: Midterm Project (Geocinema) – Jingyi Zhu

Link: https://drive.google.com/open?id=1Btq-_Lf011ix5ZtnHHLd5DasnCvPvnOj

Date: 03.25.2019

Partners: Candy Bi, Sebastian Lau, Tyler Roman

Ideas and Concepts:

1> Choice of location and theme

Our project explores a way to narrate Zikawei Observatory and its related sites in Shanghai with a focus on meteorology as a science that connects with many other fields. Zikawei Observatory was the first meteorological observatory in Shanghai established by the French Jesuits. It contains a rich history of the development and expansion of meteorology in Shanghai and in China which we think is worth presenting. Zikawei Observatory is the starting point of scientific meteorological observations in Shanghai, of public weather reports that safeguards navigation and everyday life, and of a global network of observatories for weather data exchange. Continue reading “CPD: Midterm Project (Geocinema) – Jingyi Zhu”