the-krisney-way

Find my designs on awesome products by clicking here!

iTimeOut: NEW GAME!

Play Now by clicking here!

30 Days of Disney Jobseeking Advice

When jobseeking seems a little too boring. (April 2021)

The SLA Experience

Upcoming: A day in the life of an SLA.

It's a Kristen thing...

You probably wouldn't understand. :)

Tuesday, November 16, 2021

Playing With Kinect: AR Sandbox

AR Sandbox


Introduction


An augmented reality (AR) sandbox is a 3D, interactive, dynamic educational tool to help understand mapping, topography, watersheds, natural hazards, and more! This tool uses a motion sensor and specialized computer software to map contour lines (lines of equal elevation) onto the sand that adjust to the elevated levels of the sand in real time. It's a fun, and addictive, way to learn through play for the young and the young at heart.

It comprises of:
  • A first-generation Kinect
  • A short-throw digital projector
  • A sandbox for your sand (our sandbox is 40" by 30" by 8")
  • Roughly 200 lbs of white sand
  • A Linux-friendly computer with fast NVIDA GPU, running Ubuntu 14.01 or 16.04
Playing with the AR Sandbox

Setup and Play


Assuming everything is connected and software is downloaded, the first step (after switching everything on of course) was to calibrate the kinect device and align it to the base sandbox. The depth view needs to cover the entire interior of your sandbox. It's okay if it overlaps slightly.

There were a couple of steps to calibrate the corners of the projection, the alignment and elevation to cover the projection. After all the boring (and insanely annoying) part was done, we finally got to the sand part - the most exciting part.

Next step - fill the sandbox with white sand. And after that, the fun begins! We started creating islands and different shapes and messed around with the water and "rain".

The resulting augmented reality (AR) sandbox allows users to create topography models by shaping real sand, which is then augmented in real-time by an elevation color map, topographic contour lines, and simulated water.

Evaluation




Processing and Reactivision in action

The AR Sandbox has numerous functions. From natural disaster planning and preparation, to out-of-the-box learning and education.

Wednesday, November 10, 2021

Java: Data Analysis

Data Analysis (Sharks)

Computer Science assignment, 2017.   You can find the project code by clicking the Github icon. ->GitHub



Introduction


Given a text file with data representing various features and aspects of sharks, read the file, write some functions to produce the required output and save the results in a text file. These were the requirements given for the various tasks.

Each line in a text file was represented as a shark, and each feature was separated by a colon (:). The given tasks were split into three. 

The first task asked for numeric analytics, like the largest and smallest sharks, as well as counts of words and strings. The second one played on a grouping principle, grouping all the sharks by region. Finally, the third task was to implement a search feature through the Latin name of the shark, which was one of the features in the given data. All these tasks are detailed below.

Code and Analysis


The reading in and writing to of the data was standard across all the tasks. To further simplify the analysis, a Java class, Shark, was created. This class contains a blank constructor and one that requires the following features:
  • Common Name
  • Latin Name
  • Maximum Length of Growth in cm
  • Maximum Swimming Depth in m
  • Maximum Young
  • Global Presence Indicator
  • Oceanic Regions
It also contains getter and setter methods and a toString method - all basic elements of a class.

On initial composition of the main file, a function required to open up the file and parse the shark data was created. The line is split by the colon delimiter and the sharks are added to an array.

Task 1

a) The three largest sharks by length - This required sorting the array by 'Maximum Length of Growth in cm', in descending order and printing the first three names.

b) The three smallest sharks by length - As with (a), sorting the array in ascending order would suffice. And print out the first three.

*Alternatively, run a sort in ascending or descending order, and print out the respective three required for (a) and (b).

c) The total number of letters (excluding spaces) of all Latin names -. A simple counter variable along with a for loop that runs across all 'Latin names' works. For each shark, 'strip' off the space and add the length of the string to the counter variable.

d) The total number of unique words contained within all Latin names with an even number of letters - Adding each name (or part of the name) to a set should remove all duplicates. With a for loop, count the number of letters in each word. If even, add one to a counter variable.

e) The total number of unique words contained within all Latin names with an odd number of letters - The same implementation as (d), except you count the odd, instead of the even.

** Alternatively, you can do a count of even or odd, and subtracting the count from the size of the set will give you the other result. Words in the set can only either have an odd or even number of letters.

Task 2

a) For each unique region, print the common names of the sharks - 
Start off by finding all the unique regions. You can either have these in a set (the easier way as sets don't allow duplicates), or filtered in an array (I used array as this proved useful for other parts of this task). 

As the results have to be printed in alphabetical order, sort the array.

Run a for loop (or a bunch of them). For each region, check against each shark's oceanic regions. If it exists, add the Common Name to a colon-delimited string. Split the string and sort the array in alphabetical order. Print the results for each region. 

Task 3

a) Prompt the user to enter a search string. Match the input string to Latin names of the sharks and print the common and Latin name (with search string in uppercase) - 

For each shark, check if the Common Name contains the search string (converting both to all lowercase). If it does, find the respective sub-string indexes and convert to uppercase. Add the common name and Latin name to an array (or two arrays). Sort the array alphabetically by Common name and print results.

If no results, print No Results Found.



 
Loading...