To help us understand the concepts Ant will be delivering in the next session we were advised to do a little bit of research.
Okay everything I found on the internet regarding this felt like hyper jargon and flew straight over my head. So I have my fingers crossed that it all becomes far more clear next week.
From what I can gather they’re a planning tool to map out an overall view of code, whether this be for games or application development. They aid in visualising and describing how a system works on paper before committing any of it to code. For now I’m going to consider it a logical ‘storyboard’ for programming.
The diagram above is your basic class diagram that Ant wanted us to find, its comprised of a box divided into three sections, these are attributes, operations and responsibilities. All nested under your class.
I tried going into examples of filled in class diagrams and other rules regarding them but none of it would stick, I feel like I really need it delivered with better context. My eye however was caught by operations having public and private visibility to other parts of the diagram which I assume works similar to public and private variables in Unity.
The table came with this breakdown:
- Public : allows other classes to see the marked information.
- Private : hides information from anything outside the class partition.
- Protected : allows the child classes to access the information from parents.
Sadly this about the most I understood. With some luck I can write something more comprehensive next week.
Thankfully this isn’t as confusing, although it has been about 14 years since I last covered the topic in secondary education. However the basics are as follows.
Trigonometry is used to calculate the lengths/sides and angles of right angled triangles.
Each side of the right angled triangle is given a unique name, the hypotenuse, the opposite and the adjacent. Here is a handy diagram.
The hypotenuse is always the longest side opposite the right angle. Opposite and adjacent are dependant on which angle you are looking at. Naturally the side opposite the angle in question is the opposite, leaving the remaining side as the adjacent.
Using these and the three trigonometric ratios (sin, cos, tan) we can determine missing lengths.
|sin(θ) = Opposite / Hypotenuse|
|cos(θ) = Adjacent / Hypotenuse|
|tan(θ) = Opposite / Adjacent|
To find the length of side BC (the opposite) we would use sine.
- We are given angle A and side AB.
- AB is the hypotenuse.
- BC is opposite angle A.
Since sine = opposite/hypotenuse, we can use this to figure out the missing value.
- sin = opposite/hypotenuse
- sin 30 = BC/7
- Multiply both sides by 7
- 7 x sin30 = BC
Run it through a calculator and we get 3.5(cm).
Thats about the basics for trigonometry. If class requires anymore than that I’ll update next week. Pulling out information I was taught half my life ago is taxing, I should not have needed the assistance of google to write this, sadly fourteen years of other knowledge tends to push out things you don’t use on a daily basis.