interactive video 2018 week 4 from 김윤수 on Vimeo . interactive video 2018 week 42017310663 Yoonsoo KimOne of my favorite animation is < Frozen >. I was impressed by the scene that Elsa took off her gloves and ran away into the snowy forest because she finally got freedom . I ' d like to represent the change of Elsa and the background , but it was too hard to express the detailed things . So I load the images to compensate for the detail . I made the glove when the background is castle , and I made the glove disappear when the background is changed . code / / interactive video 2018 week 4 2017310663 Yoonsoo Kimfloat angle = 0 ; float xPos = random ( 10 , 490 ) ; float yPos = random ( 10 , 490 ) ; PImage elsa 1 ; PImage elsa 2 ; PImage sf ; PImage glove ; PImage bgFrozen ; PImage castle ;// snowint quantity = 300 ; float [ ] xPosition = new float [ quantity ] ; float [ ] yPosition = new float [ quantity ] ; int [ ] flakeSize = new int [ quantity ] ; int [ ] direction = new int [ quantity ] ; int minFlakeSize = 1 ; int maxFlakeSize = 5 ; void setup ( ) { size ( 600 , 600 ) ; / / snow frameRate ( 30 ) ; noStroke ( ) ; smooth ( ) ; for ( int i = 0 ; i < quantity ; i ++) { flakeSize [ i ] = round ( random ( minFlakeSize , maxFlakeSize ) ) ; xPosition [ i ] = random ( 0 , width ) ; yPosition [ i ] = random ( 0 , height ) ; direction [ i ] = round ( random ( 0 , 1 ) ) ; }} void draw ( ) { / / castle & glove castle = loadImage ( " castle . jpg "); image ( castle , 0 , 0 , width / 1 , height / 1 ) ; elsa 1 = loadImage ( " elsa 1 . png "); image ( elsa 1 , 350 , 350 ) ; glove = loadImage ( " glove . png "); image ( glove , mouseX - 100 , mouseY - 100 ) ; / / frozen if ( keyPressed == true ) { bgFrozen = loadImage ( " bgFrozen . jpg "); image ( bgFrozen , 0 , 0 ) ; frameRate ( 30 ) ; elsa 2 = loadImage ( " elsa 2 . png "); image ( elsa 2 , 350 , 200 ) ; fill ( 255 , 255 , 255 ) ; noStroke ( ) ; ellipse ( xPos , yPos , 4 , 4 ) ; ellipse ( xPos , yPos , 4 , 4 ) ; xPos = xPos + 1 ; yPos = yPos + 2 ; for ( int i = 0 ; i < xPosition . length ; i ++) { ellipse ( xPosition [ i ] , yPosition [ i ] , flakeSize [ i ] , flakeSize [ i ] ) ; if ( direction [ i ] == 0 ) { xPosition [ i ] += map ( flakeSize [ i ] , minFlakeSize , maxFlakeSize , . 1 , . 5 ) ; } else { xPosition [ i ] -= map ( flakeSize [ i ] , minFlakeSize , maxFlakeSize , . 1 , . 5 ) ; } yPosition [ i ] += flakeSize [ i ] + direction [ i ] ; if ( xPosition [ i ] > width + flakeSize [ i ] || xPosition [ i ] < - flakeSize [ i ] || yPosition [ i ] > height + flakeSize [ i ] ) { xPosition [ i ] = random ( 0 , width ) ; yPosition [ i ] = - flakeSize [ i ] ; } } } if ( mousePressed == true ) { / / snowflakes pushMatrix ( ) ; noFill ( ) ; sf = loadImage ( " sf . png "); translate ( mouseX , mouseY ) ; rotate ( radians ( angle ) ) ; angle = angle + 10 ; image ( sf , 0 , 0 , width / 10 , height / 10 ) ; popMatrix ( ) ; }}