DES240#A1
- Tingting F
- Aug 17, 2021
- 2 min read
My SDG:Good Health and Well-Being
DATA:The prevalence of obesity among adults aged 15+ was 30.9 percent, which corresponds to an estimated 1.24 million adults.
citation:Ministry of Health. 2020. Annual Data Explorer 2019/20: New Zealand Health Survey [Data File]. URL: https://minhealthnz.shinyapps.io/nz-health-survey-2019-20-annual-data-explorer/
Sketches:


Final:

Statement of intent:
In my design, I use small triangles and squares to represent food. The 30 moving spheres represent people, and these spheres are moving freely. Among them, the volume of 10 (~30.9%) spheres has become larger, because they have eaten "food", and their color has changed from grey to obvious white. this means that 31% of people are obese.
I think people should face the problem of obesity. Obesity affects not only a person's appearance but also people's health. Obesity has a wide range of negative effects on health, involving many physical diseases, and it also has an impact on people's mental health. In New Zealand, more than 30.9% of adults suffer from obesity, and the number is as many as 1.24 million. Therefore, we should prevent, control and manage obesity. I hope that through my design, people will be aware of obesity and maintain their physical and mental health.
Code:
Particle [] ps;
Shape [] sp;
int sNum,spNum;
int maxDistance=100;
int SIZE=20;
int pNum=31;
float change=0;
float t,col=200,T;
void setup()
{
size(1000,1000);
sNum=36;
spNum=100;
ps=new Particle[sNum];
sp=new Shape[spNum];
//cite the class
for(int i=0;i<sNum;i++)
{
ps[i]=new Particle();
}
for(int i=0;i<spNum;i++)
{
sp[i]=new Shape();
}
}
void draw()
{
frameRate(20);
background(0);
noStroke();
//draw the m particle
for(int i=0;i<spNum;i++)
{
sp[i].update();
}
//draw the s particle
for(int i=0;i<sNum;i++)
{
ps[i].update();
}
//s to m
for(int k=0;k<11;k++)
{
int i=k*(pNum/11);
for(int j=0;j<spNum;j++)
{
if(dist(ps[i].positionX,ps[i].positionY,sp[j].positionX,sp[j].positionY)<(sp[j].size+ps[i].size)/2 && sp[j].Col!=0 && ps[i].Col<240)
{
ps[i].size+=SIZE;
sp[j].Col=0;
ps[i].Col+=20;
if(ps[i].size>300)
{
ps[i].size=300;
}
}
}
}
/*
if(T>150)
{
col+=5;
t+=2;
if(t>600)
{t=600;}
if(col>255)
{col=255;}
fill(col);
ellipseMode(CENTER);
ellipse(width/2,height/2,SIZE+t,SIZE+t);
}
*/
T++;
}
//create the s particle
class Particle{
float Col,size;
float speedx,speedy;
float positionX;
float positionY;
Particle()
{
Col=100;
size=100;
speedx=random(-5,5);
speedy=random(-5,5);
positionX=random(size,width-size);
positionY=random(size,height-size);
}
void update()
{
fill(Col);
ellipseMode(CENTER);
ellipse(positionX,positionY,size,size);
positionX+=speedx;
positionY+=speedy;
if(positionX-size/2<0 || positionX+size/2>width)
{
speedx*=(-1);
}
if(positionY-size/2<0 || positionY+size/2>height)
{
speedy*=(-1);
}
}
}
//create the m particle
class Shape{
float Col,size;
float controlShape;
float positionX;
float positionY;
Shape()
{
Col=50;
size=20;
controlShape=random(2);
positionX=random(size,width-size);
positionY=random(size,height-size);
}
void update()
{
//give the data to rect
if(controlShape<1)
{
fill(Col);
rectMode(CENTER);
rect(positionX,positionY,size,size);
}
//give the date to triangle
if(controlShape>1)
{
fill(Col);
triangle(positionX-size/2,positionY+size/4,positionX+size/2,positionY+size/4,positionX,positionY-size/2);
}
}
}
Miro link:

Comments