Week 15 – Final Composition and Review of Semester

Final Composition

Final Composition

For my final composition, I really wanted to go all out. I was thinking of a way of shaping a terrain, like a generative landscape circumscribed by beautiful curves and colors. From my experience studying electromagnetism my junior year, I knew vector fields of attraction or repulsion can create beautiful compositions. So my goal was to simulate a pseudo vector field (this really isn’t exactly realistic) with 3 attractors, randomly positioned across the canvas. Toxiclibs is a great resource for simplifying the process of coding such a scenario because the its vector classes and verletphysics engine take out most of the manual setting up of forces and correspoding motion of the particles. You simply set up your grid of particles and attractors as arrays and the kinematics are automatically calculated.

 

Prof. Ponto has asked me to prepare a brief review of the semester by answering some questions.

1- What are your overall feelings on your project?

– I am very satisfied with what I accomplished this semester. This was my first time coding and each week I feel that the complexity of my compositions and the flow of writing code got a lot better. At the end of the semester, I started getting a bit sidetracked by my other academic responsibilities but I am very glad that I ended up with 14 different sketches, some of which could be used for the conceptualization of architectural form.

2- How well did your project meet your original project description and goals?

From a logistics point of view, according to my syllabus I should have ended up with 16 different sketches. I was only able to complete 14 compositions and 12 blog entries, though I am finishing up two additional ones before Monday. So that was an acceptable performance, in my opinion, but not stellar. I was not able to do Chapter 5 of the “Nature of Code” which would have introduced me to boids and flocking behaviors, which is really the real core of autonomous agent systems. With that said, I was able to get a lot of practice on particle systems.

3- What were the largest hurdles you encountered? How did you overcome these challenges?

Coding is difficult. It takes me a lot of time. I feel like I can code, but probably not for a living. I feel like I am not expedient enough. But there is something that really pushes me to want to continue doing this. I really want to prove that I can be part of the next generation of generative designers. I want to be able to use these simple algorithms in the conception of a building. When I look at the images that the code generates, I always find myself extracting the form and making it architecture in my mind. That intrigue of what it could be if I were to use the curves  or point clouds as the basis of building plan, or landscaping or actual 3D forms, was motivating enough to keep pushing harder.

4- If you had more time, what would you do next?

I definitely want there to be a next time, next semester. I have set my mind on coding  boids and meshes from their trajectories and Processing, with the addition of another library, has the capability of creating isosurfaces from point data that can then be exported to a 3D modeling package for polishing and sculpting. I want to develop a workflow between my code and the software that I already use like Rhino, 3DS MAX. I want to continue the study of agent based systems as a another of form exploration.

Thank you so much.

Week 14 – Extending Processing physics-based simulations with Toxiclibs

This week covered Chapter 5 of “The Nature of Code” which introduces us to a very useful library for physics based simulations called Toxiclibs.

I am using Toxiclibs to create my final composition because it is great to produce compositions based on vector fields. However this chapter focused on Toxiclibs classes to simulate soft bodies. Toxiclibs contains it’s own set of particles package called VerletParticles, and  springs called VerletSprings. When you first begin a sketch using Toxiclibs you will have to include an import statement for a particular package to reference back to the methods and classes that you are going to use. The reference doc is very extensive and can be found here.

For the chapter, I completed the exercise that asked to develop a softbody cloth using a grid of particles connected by strings. This required once again, much like in the shatter example, the need to arrange particles in a grid separeted by a distance which would equal the rest distance of the spring. Below is a screenshot of the simulation:

Cloth Simulation

Cloth Simulation

For this week’s composition, I decided to still continue with the particle systems and leave the use of toxiclibs for my final composition. I wanted to try something more geometrical and thought that I could come up with an evolving polygon by having particles connect to each other as they moved abt the screen space. In the future, an export of these lines to a CAD software can be incorporated into the application such that the 2D forms could be used as the starting basis of a floor plan. My sketch can be played here.

Week 13 – Polymorphism and Inheritance… Particle Systems continued…

I haven’t gotten a chance to talk about Polymorphism and Inheritance from Chapter 4 yet so I wanted to make a post about them.

 

We have seen how coding particle systems becomes a lot more intuitive when done in an object – oriented way by creating classes and defining arrays of objects of those classes. In more complicated scenarios, we may want to have more than one type of particle or agent with specific functions associated with it. Even then, it is very likely that each class will still have a lot of the same properties; since they are particles, their constructors will all have location vectors, velocity vectors and acceleration vectors. Moreover, their functions for describing motion may be the same. So it would seem like a good idea if we could re use the code in some way. Inheritance allows us to do this very easily by extending the properties of another class. So a class that inherits another class becomes a subclass of that class:

class Cat extends Animal {
  Cat() {
    super();
  }
  void meow() {
    println("MEOW!");
  }
}

This means that the cat inherits all of the properties and functions of the Animal. Using super() makes sure that the same initialized properties of the Animal(height, weight) are given to the cat. Also any functions of the animal, for example, eat(), sleep() are also now applicable to the cat. In addition to those functions, the cat object can have its own functions.

So what becomes of a cat object when it is extending another class? In cases where we are declaring arrays or arraylists, code specifies the type of objects that array will store,

ArrayList<Cat> kitty = new ArrayList<Cat>();

Polymorphism makes it possible to store subclasses of a class together as if they were the same type. So it is now perfectly valid to say

ArrayList<Animal> kitty = new ArrayList<Cat>();

With particles systems, this enables us to store all types of particles into one array as long as all the subclasses extend the same Particle class.

 

For this week’s project, I wanted to make sure that I was able to do particle system branched out into a particle class and a particlesystem subclass. This is a good way to start getting into the habit of coding a particle type and then a particle controller. First I did two exercises out of the chapter.

The first exercise asked for a movable rocket. This was basically an extension of Week 10 sketch of having a particle system moving while releasing particles.

Asteroid Exercise

Asteroid Exercise

The second exercise wanted a geometrical form to divide into smaller pieces or shatter. This amounted to using our regular Particle class and then having our ParticleSystem class arrange them in a grid. I wasn’t able to center it in the middle so I think my arrangement was off. When you clicked on the canvas, the particles began their kinematic method and started moving as if shattering.

Shatter Exercise

Shatter Exercise

For this week’s script, I decided to do another particle system but this time incorporating oscillation kinematics, as covered in Chapter 3, to give the particles a more life-like appearance. The particle system was done following the style of using two classes, one for the particle and one for the particlesystem. You may see the script here. Originally I had planned to incorporate the collisions in this script but I ran out of time.

Progress report 3

I worked on IRB and developed questionnaire.

Following Alex and Prof. Ponto’s advice I tried to describe overall procedures rather broadly than providing detailed description, however since all documents(i.e. survey questions, consent forms, and recruitment materials) should be coherent(those things get stamped at the end) it was quite challenging to make overall IRB proposals and all these documents sensible and go well with each other. As any changes on those documents mean a change request, I tried to asked for everything I might want to do which took me a quite time. IRB has been submitted on last Monday.

As I stated in IRB proposal, throughout the study I intend to

1) Explore shopper’s in-store shopping paths and purchase behaviors both in an actual store and different types of 3D virtual stores

2) Compare and analyze the static measures

3)  Assess the validity of measuring in-store behaviors in computer simulated virtual retail environments.

I did not fully describe plans for data analysis however I intend to produce two different studies through this project. The overall structure of the project would be as following.

During stage one, I will investigate the validity of measuring in-store behavior in 3D VR environment by comparing static measures that include 1) walking path 2) deviation from optimal walking path 3) number of item examined 4) category of items examined 5) time spent in the store environment to same data set obtained from actual store.

This is an original & primary plan for STAR project. The biggest challenge is how to assess the validity of outcome measures. With the small number of participants (about 20 participants in each condition) absolute value comparison can not be quite meaningful. As what I am interested in is shopping pattern (e.g. do participants examine VR store in a similar manner as they do in actual store) descriptive analysis could be more meaningful.

Stage two, in which I newly developed my interest, involves exploratory look into in-store behavior. Surprisingly, to my knowledge, there are only handful of researches that examined causal relationship between in-store shopping path and purchase behavior. Even  existing pertinent study on shopping path majorly focused on relationship between in-store shopping distance and unplanned purchase behavior. “Unseen is unsold” has become an industry adage however there is no research that explicitly studied how seeing lead to buying. Using the instrumental approach, head mount action camera, I will be able to estimate the direct impact of in-store attention to subsequent searching behavior. To develop a valid research frame work, I am currently working on investigating other variables(i.e. prior exposure to the brand, consumer impulsivity) that have potential impact on such attention-searching relation.

Walking path Data) 

Reference path or optimal path: It refers to shoppers planned in-store path that minimize the distance he or she must cover to pick up all planned purchases.

Actual shopping path(=reference path+error): While in the store, the shopper may deviate from the reference path. For example, the shopper who planned to buy winter jacket may be attracted to warm winter hat displayed in the store and thus incur additional travel distance.

Deviation for the shopping path(error): this is primary interest of mine. I would like to see how it relates to unplanned purchase behavior and store layout.

Survey question

(1) familiarity with the University bookstore in terms of product location and store layout

(2) last time visited university bookstore

(3) mental map (do not know how to use this but just included it just in case)

(4) whether participants have shopping list for current shopping trip or not

(5) expected expenditure for the shopping

(6) all the product they plan to purchase

Screen Shot 2015-12-10 at 6.40.46 PM

Progress report 2

3D scanning of University book store 2

I revisited the university bookstore last Sunday (9th of November) morning and conducted 3D scanning.  Total number of scan is 17 and this was done from 7:50 to 11:15 AM.

1

2

Problems

Section 3 was mostly covered however I could not capture the large part of section 2(Art supplies, pen and notebook etc.) The overall store doesn’t look so bad without these school supplies area in Scene though. Since Duanne won’t be able to make a time until Thanksgiving, I might visit the store again early December in case needed.

3

As the number of data set increases, the computer often freeze and get really slow making it unable to do additional editing. Markus recommended me to use another computer in the Lab.

The merchandises were changed a lot. As the store has changed the location of shelves and items, many items are overlapping creating messy look. It seems like it will take quite a lot of time deleting overlapping item and reorganizing the store manually.

4

5

Literature Review

1. Location of Items in the store

“Consumer Fit Search, Retailer Shelf Layout, and Channel Interaction”

Gu, Z., & Liu, Y. (2013), Marketing Science32(4), 652-668.

This is recently published study on Marketing Science and I found out that this study actually examined what I wanted to explore. This study explored the strategic implication of retailer shelf layout decision. That retailers are more likely to benefit from displaying competing products (e.g. coach and Michal Kors) in distance locations. While displaying competing product in the same location allow consumer to inspect various products all at once, in distance location consumer are induced to inspect one product first and then decide whether to incur the travel to inspect another one.

2. Product design on Choice

“The Impact of Product Design on Choice: A Dual-Process Explanation”

CLAUDIA TOWNSEND and SANJAY SOOD

UCLA Marketing Ph. D dissertation, Accepted to Journal of Consumer Science

Although this study is not quite relevant to my study, I found it fascinating since there are limited number of marketing or retailing studies that explored impact of design on choice.  This study divided product attribute into functional attributes and design (aesthetic) attribute and conducted 4 studies examining differences between these two attributes. The study results imply that consumers may not be fully aware of the effect of aesthetics on choice although design hugely influences their choice. Respondents are sensitive to variations in the price premium for function attributes, with design response to price premium variations is negligible across large ranges in values.

Plan for Next Week

-Working on 3D scanned data-clean up overlapping merchandise

-Develop questionnaire and detailed plan for study

 

Week 10 Particle Systems and Beginning of Collisions

Unfortunately, Chapter 4, namely, Particle Systems will require another week to finish. That’s not so bad since after chapter 4, there are only 2 more chapters to finish this semester’s main learning curriculum. There are a few sections of Chapter 4 on inheritance and polymorphism that I did not get to cover because I ran out of time.

The sections I covered of Chapter 4 discussed the idea of not just having one particle class but rather having multiple classes communicating with one another to handle systems of systems of particles. The other topic covered was coding in lifespan for each particle so that the program did not bottleneck from continuing to draw all the particles emitted. The author introduced the arraylist class, though I had already been using it since Week 5 when I decided to jumpstart on composing particle systems. I was introduced to this more convenient form of an array in  brief look I had on Chapter 23 of “Learning Processing”. For particle systems, it is extremely convenient since it allows straightforward resizing of the array by adding and removing items. The regular array can also be resized but it is not as easy as just “arrayname.add” or “arrayname.remove”. As my weekly composition, I decided to do one of the exercises that required me to make a moving emitter. The sketch can be seen here.

I spent most of the week trying to tackle the problem of collision, something Prof. Ponto suggested. It actually turns out to be a little bit more complicated than I thought (lol). Prof. Schiffman actually dedicates an entire chapter, the next chapter I am supposed to cover, on the use of an external physics engine built for Java called Box2D for collisions. But he also says it is possible to tackle simple collisions without the need of an additional class library like Box2D. Anyways I feel I am getting close but I still don’t have a working composition for the collisions of multiple particles. But here’s what I got so far.

Okay so the basic pseudo algorithm we are looking to code is as follows:

– Have Particle objects stored in arraylist
– Objects store location, velocity and size
– Objects check for collision with border and collision with each of the other particles
– Each object will loop through the array, checking if any of the particles are colliding with it.
– The object will bounce off the other objects depending on size and velocity
The part I focused on this week was detailing the class of Particles and writing functions for the constraints with window border and for the bounce.
The writing of the bounce function was probably the trickiest part for me but I did some research on the internets and found this really helpful animation of how each vector is playing out in the collision of two objects. Essentially, the bounce function will determine the velocities of each object after they collide by taking the velocity vector of one of the objects and mapping it to a local coordinate system oriented abt the direction of one particle center to the other particle center. So for the bounce function work we need another function that extracts the component vectors:
Bounce Function

Bounce Function

Now I just need to come up with the actual collision function which checks if two objects are colliding and applies the bounce function to give each a different velocity in different directions. I will complete this by next week and finish Particle Systems.

See you soon.

 

 

 

DS699 – Week of 11-07-2015

Installation of glass window mapping design is done. In the past weeks, it’s production, production, production…….

The large scale transparent prints arrived. More fine measurement, final cutting, clean glass windows, and finally putting the prints up.

All_SideViewR_1229 Far_Front__1187 Far_SideR1212 Lower_Front_Goodtake1_1188 Upper_Front_ppl_1197 Upper_Inside_SunlxL_1166 Upper_Inside_SunlxR_1170

Progress report 1

3D scanning of University book store

I scanned the University bookstore(711 State St, Madison, WI 53703) on 25th of November using FARO 3D laser scanner. The total number of scanned files are 15(took 8-10 minutes per each). It took about 4 hours(from 7:00-11:20AM) as a whole. Since the battery was ran out during the scanning job, I had to stop scanning and charge it for about 20-30 minutes. (*Make sure fully charge two batteries next time before starting scanning work).

I roughly divided the store in three sections.

Section 1:Left side of the store-Fashion apparel items/ Section 2:Back side of the store-School supplies and gift shop/ Section 3: Right side of the store-Fashion apparel items and badger items.

Section 1 area are mostly covered except women’s apparel section. Additional scanning job is necessary for the rest of areas.

Untitled-6

I planed to revisit the store upcoming Sunday(November 8th) from 7:30 to 11:30. Since this could be last chance of scanning(Duane won’t be able to have time until Christmas), I will try to scan as many as possible probably about 18-20 files (5, 6 scan per hour).

Screen Shot 2015-11-04 at 8.45.14 PM

 

Registering Scanned data

Using software SCENE(specially designed software for FARO focus 3D), I registered scanned data set. Since one data set was ruined due to the low battery during scanning, 14 scanned data out of 15 were used for registering job.

Although overall visualization of the store seems to nice, scanner couldn’t capture the whole appearance of apparel items. As items were displayed so densely, capturing images from whole perspective was challenging. Just in case, I took pictures of individual set of item for the possibility of using PhotoScan. (But I don’t know how to import PhotoScan files into SCENE and combine two different data set or vise versa, I will explore this later)

Untitled-7 Untitled-8 Untitled-9

 

Plan for next week 

November 6th and 7th – Literature review on shopping path studies and develop questionnaire. Idea development for shopping path study.

November 8th – Scan the bookstore

November 10th- Register the scanned data

 

 

Week 9 – Oscillation

This week I covered Chapter 3 of “The Nature of Code”. The chapters keep getting  more and more in depth and the exercises more complicated. But I was able to finish two of the exercises and create a neat little artistic particle system using a trig function to define a boundary. You can see it here.

In the past we have covered motion and we borrow the same principles of motion simulation to model oscillation in the Processing environment. Before we had the following two key statements to make agents move:

location.add(velocity);

Now for oscillation we use:

angle.add(avelocity);

We know that both sin and cos oscillate between (-1,1). In a past week, I implemented the notion of using trig functions with the frameCount to define the locations of drawn elements. This is essentially what we will do also with an oscillator, whose x and y coordinates will be given by Amplitude * sin( some increasing angle) and Amplitude * cos (some increasing angle). The first exercise asked me to find a way to make a pattern out of an array of oscillators. I used trig functions to make initialize the velocities in a rhythmic pattern:

Oscillator class

Oscillator class\

Initialization of Oscillators' velocities with trig functions

Initialization of Oscillators’ velocities with trig functions

We also looked at waves. The exercise I did required me to encapsulate a wave into a class and create a pattern:

Wave Class and Pattern

Wave Class and Pattern

This week I will be looking at Chapter 4 and hopefully conceive a colliding particle system.

See you soon.