## Introduction

Every year, Santa needs to prepare for Christmas day. There are so many gifts and so many children but also so little time. This means Santa often has to hurl gifts across long distances to save vital time.

For this week’s challenge, we are creating a training game for Santa where he can set an initial launch angle and velocity to see if he can hit various goal distances.

## Requirements

##### Parameter Setup

Let’s start by setting up parameters we will need for the challenge. All parameters are a series of numbers with their own step size.

- Goal Distance – From 100 – 1000; Step size of 10
- Launch Angle – From 5 to 45; Step size of 10
- Velocity – From 30 to 100; Step size of 10
- Mode – 0 or 1 (Representing Aim and Fire)

**Calculations**

Create a table of points from 0 to 20 which will act as the incremental points as your projectile moves from point 0 to 20. Within this table, create the following:

- Vx (velocity in the x-direction) = Velocity*cos(Launch Angle*PI()/180)
- Vy (velocity in the y-direction) = Velocity*sin(Launch Angle*PI()/180)
- Max Time (time of flight) = 2 * [Vy] / 9.8
- Max Distance = [Vx] * 2 * [Vy] / 9.8
- Height = [Vy]*[Time]-0.5*9.8*[Time]^2
- Distance = [Vx]*[Time]
- Gift = unichar(127873)
- Time = Incremental time between 0 and max time (make this dynamic in case we wanted to increase the number of points)

**Hints**

- There is a table of points that we created and each one of those points represent different times, distances, and heights across the motion of the gift. The max distance and time would be seen on the last point and since the points are the same distance apart, time can be split across these points equally.
- The distance and height are representative of the x and y on a chart. The gift calculation above provides the emoticon of a present that can be plotted for the points we created.
- Charticulator is a great option to obtain the desired look. There are other options and I did get the same effect using different visuals.
- The chiclet slicer custom visual was used for the parameter selections on the left side.
- The aim selection should show 7 points while the fire selection shows all points with a prompt letting the user know if they hit their target.

## Dataset

The dataset for this week is completely based on parameters and calculations. Here is the image for this week:

## Share

After you finish your workout, share on Twitter using the hashtags #WOW2022 and #PowerBI, and tag @JSBaucke, @MMarie, @shan_gsd, @KerryKolosko, @NerdyWithData. Also make sure to fill out the Submission Tracker so that we can count you as a participant this week in order to track our participation throughout the year.