Shodor Projects

Magic 8 Ball

Parallel Computation of Pi

I used a program in C to use different threads of a computer to compute the value of pi. The program divides a quadrant of a unit-circle (with the area of pi/4) into different rectangles, then assignes rectangles to different treads for processing. After forking and all the processes are completed separately, they are joined and summed to return an approximation of pi.

Download Compiled Program Here

#include <stdio.h>
#include <math.h>
#include <omp.h>
const int NumRectangles = 500;

int main() {
float width = 1.0 / NumRectangles;
float x;
float height;
float area = 0.0;
float pi;
int i;
#pragma omp parallel for private(x, i) reduction(+:area)
for (i = 0; i < NumRectangles; i++) {
x = i * width;
height = sqrt(1.0 - x * x);
area += width * height;
}

pi = 4.0 * area;
printf("pi = %f\nwhen n = %d\n", pi, NumRectangles);
return 0;
}

Fish and Seals JavaScript Model (With Andrew Nyland and Vincent Xia)

This model depicts how fish and seals may interact in an ecosystem that contains "tagged" fish which become easier for the seals to track and eat. The tagged fish are displayed with red circles spreading outwards and in our program, the seals are programmed to move in the direction of these.

Originally, we were tasked with creating this seals and fish model by editing a skeleton javascript and html file. However, we felt constrained by these parameters and instead decided to begin a model from scratch to create a user-friendly, visually appealing, and less confined model.View a live simulation here

Fish and Seals AgentSheets Tagged Model (With Andrew Nyland)

This is similar to the aforementioned model, however it adds the populations of tagged fish and tagged seals. Seals are attracted to tagged fish, and fish are able to run away from tagged seals.
All populations grow over time as new individuals are born. Over time, seals die if they have not been fed.View a live simulation here

Fish and Seals AgentSheets Balanced Model (With Andrew Nyland)

This agent based model visually simulates interaction in the predator-prey relationship of seals and fish. View a live simulation here

Tagged Fish and Seal Vensim Model (With Gender Addition)

Similar to the other Vensim model, this model shows the population comparison. However, the added variable of gender is accounted for in this model.

The equations have been modified from the original to represent interactions. As for the equation of the fish birth rate, it was represented with the product of both male and female populations. Download the model here

Tagged Fish and Seal Vensim Model

A system based Vensim model explaining the Predator-Prey relationship between populations of tagged and untagged seals.

In this model, the seal birth rate is relative to the number of fish currently alive. The fish, have a death rate relative to the number of seals currently alive (representing the predators).

It can be Downloaded Here

Office Ethics Homework

Tyler French
18 October 2014

If presented with the situation stated, as a part of the interface team of the RED company, and was struggling to meet my deadline, I would be sure confront myself and make a decision about the proper course of action.The first part of my decision involves self dedication. I would completely invest myself in the project at hand fully and completely, to be sure it is completed on time. Secondly, I would speak with the members of my group about the importance of their roles, and explain to them why this project is such an important asset to the company. Lastly, I would express to my team members an understanding of their current situations, but I would also state that it would be greatly appreciated to have as much assistance as possible. This would be a smart plan of action, as it would ensure peacefulness and productivity within the group.

The task would be complicated and take a lot of time and dedication to complete, but the extra effort is necessary in order to complete the task on time. I believe in the importance of self-dedication. If I was behind on a project that needs to be completed, I would devote all of my resources available to ensure that task is completed in a timely manner. It may seem to be a lot to handle, and a difficult amount of work to manage, but the results would sure be worth it. Working extra hours, improving your skills, and completing an important task are all things that will benefit you in the long run. Your peers will respect your dedication and so will your boss, Bob.

When presented with a situation with issues with within my team of coworkers, I would be sure to speak with them about the issues we would need to face together. I would take my time to listen and respect all of their current needs and wants, and respect the amount of commitment they are able to give to the task at hand. In order to help persuade them, I would be sure to stress the importance of the project that is necessary to be completed, and the importance of completing it on time. I would ask them to (given their current circumstance) devote as much time as they could towards helping complete the project. However, I would make sure to stress that it is completely understood if they were unable to dedicate as much time as it would need, and this would be no problem to me. I would be very appreciative of all the assistance they could give me.

I personally believe, in a professional business environment, it is important to approach all issues with as much positivity, respect, and kindness as possible. It is important to come to a consensus between each other, and figure out what course of action is best for your situation. If I was presented with the explained situation, I would understand the dedications my fellow team members have made, and I would take on the work they are unable to complete myself. It would be difficult for me, so I would be sure to explain the importance of the project, and ask for as much help as they could comfortably give, although I would not push them. It is important to maintain positive relationships and a good spirit throughout the workplace. Sometimes we have to make a few sacrifices in order to do this, but it is almost always worth it.