Filling Rotated and Scaled Rectangles
⚠ Click here to regain focus ⚠

?

?

t / T Toggle theatre / SUPERtheatre mode

z Toggle filter mode V Revert filter to original state

X, ShiftSpace Toggle category and focus previous

v Invert topics / media as per focus

# Keyboard Navigation

## Global Keys

W, A, P / S, D, N Jump to previous / next markert / T Toggle theatre / SUPERtheatre mode

z Toggle filter mode V Revert filter to original state

## Menu toggling

q Quotes r References f Filter c Credits## Movement

a

w

s

s

d

h
j
k
l

←

↑

↓

↓

→

## Quotes and References Menus

Enter Jump to timecode## Quotes, References and Credits Menus

o Open URL (in new tab)## Filter Menu

x, Space Toggle category and focus nextX, ShiftSpace Toggle category and focus previous

v Invert topics / media as per focus

## Credits Menu

Enter Open URL (in new tab)⏫

Previous: 'Bases Part II'

⏫

0:23Recap of people egging Casey on to do some weird sine-cosine-theta stuff

^{α}0:23Recap of people egging Casey on to do some weird sine-cosine-theta stuff

^{α}0:23Recap of people egging Casey on to do some weird sine-cosine-theta stuff

^{α}1:36Blackboard: Introduce effects

1:36Blackboard: Introduce effects

1:36Blackboard: Introduce effects

4:39Blackboard: How do we do this rotation and scaling?

4:39Blackboard: How do we do this rotation and scaling?

4:39Blackboard: How do we do this rotation and scaling?

5:29Run the game

5:29Run the game

5:29Run the game

5:51Clip away all this ridiculousness

5:51Clip away all this ridiculousness

5:51Clip away all this ridiculousness

6:32Look at the coordinate system

6:32Look at the coordinate system

6:32Look at the coordinate system

7:13Blackboard: We need to know which pixels will be included as a result of rotating a rectangle

7:13Blackboard: We need to know which pixels will be included as a result of rotating a rectangle

7:13Blackboard: We need to know which pixels will be included as a result of rotating a rectangle

8:35Blackboard: How the collision detection system may be applicable to pixel filling

8:35Blackboard: How the collision detection system may be applicable to pixel filling

8:35Blackboard: How the collision detection system may be applicable to pixel filling

9:51Blackboard: Ignoring rotation and scaling for now

9:51Blackboard: Ignoring rotation and scaling for now

9:51Blackboard: Ignoring rotation and scaling for now

12:34Blackboard: Iterating over the pixels

12:34Blackboard: Iterating over the pixels

12:34Blackboard: Iterating over the pixels

13:44Look at the DrawRectangle routine

13:44Look at the DrawRectangle routine

13:44Look at the DrawRectangle routine

14:22Write a function, DrawRectangleSlowly, that does DrawRectangle in the least efficient way possible

14:22Write a function, DrawRectangleSlowly, that does DrawRectangle in the least efficient way possible

16:43Draw a rectangle that's at the origin of the CoordinateSystem

16:43Draw a rectangle that's at the origin of the CoordinateSystem

16:43Draw a rectangle that's at the origin of the CoordinateSystem

18:11See the results in-game

18:11See the results in-game

18:11See the results in-game

18:23Stop it rotating for the moment

18:23Stop it rotating for the moment

18:23Stop it rotating for the moment

18:41Check the scaling of the axes

18:41Check the scaling of the axes

18:41Check the scaling of the axes

19:54DrawRectangle after the fact in a different Color

19:54DrawRectangle after the fact in a different Color

19:54DrawRectangle after the fact in a different Color

20:31Note that the rectangle is not properly clipping to its max bounds, and rectify this

20:31Note that the rectangle is not properly clipping to its max bounds, and rectify this

20:31Note that the rectangle is not properly clipping to its max bounds, and rectify this

21:11Moment of realisation: We were adding Entry->Origin twice

21:11Moment of realisation: We were adding Entry->Origin twice

21:11Moment of realisation: We were adding Entry->Origin twice

21:27We're filling correctly but inefficiently

21:27We're filling correctly but inefficiently

21:27We're filling correctly but inefficiently

21:58Consider restricting the area that DrawRectangleSlowly marches over

21:58Consider restricting the area that DrawRectangleSlowly marches over

21:58Consider restricting the area that DrawRectangleSlowly marches over

22:21Blackboard: How does that help us do our rotation and scaling?

22:21Blackboard: How does that help us do our rotation and scaling?

22:21Blackboard: How does that help us do our rotation and scaling?

23:25Blackboard: Can't we just test against four corners of our rectangle?

23:25Blackboard: Can't we just test against four corners of our rectangle?

23:25Blackboard: Can't we just test against four corners of our rectangle?

24:35Blackboard: How we could have done that without Casey's help

24:35Blackboard: How we could have done that without Casey's help

24:35Blackboard: How we could have done that without Casey's help

28:55Implement one of these edge tests

28:55Implement one of these edge tests

28:55Implement one of these edge tests

29:50Make DrawRectangleSlowly take all of the coordinate system information

29:50Make DrawRectangleSlowly take all of the coordinate system information

29:50Make DrawRectangleSlowly take all of the coordinate system information

30:57Make DrawRectangleSlowly do the edge tests using the dot product

30:57Make DrawRectangleSlowly do the edge tests using the dot product

30:57Make DrawRectangleSlowly do the edge tests using the dot product

32:18Blackboard: Rephrase these edge tests

32:18Blackboard: Rephrase these edge tests

32:18Blackboard: Rephrase these edge tests

32:57Turn the test around

32:57Turn the test around

32:57Turn the test around

34:03Notice that, because we're not doing the dot product, the sign doesn't flip

34:03Notice that, because we're not doing the dot product, the sign doesn't flip

34:03Notice that, because we're not doing the dot product, the sign doesn't flip

34:33Make greater-than be our standard

34:33Make greater-than be our standard

34:33Make greater-than be our standard

35:03Blackboard: Think of the surface normals pointing outwards

35:03Blackboard: Think of the surface normals pointing outwards

35:03Blackboard: Think of the surface normals pointing outwards

35:20Change all of those edge functions to be negative

35:20Change all of those edge functions to be negative

35:20Change all of those edge functions to be negative

36:10Get the dot product in there

36:10Get the dot product in there

36:10Get the dot product in there

36:43Blackboard: What are the vectors of those perpendiculars?

36:43Blackboard: What are the vectors of those perpendiculars?

36:43Blackboard: What are the vectors of those perpendiculars?

37:29Implement those vectors

37:29Implement those vectors

37:29Implement those vectors

38:40Now we're doing the full test, see how it looks in-game

38:40Now we're doing the full test, see how it looks in-game

38:40Now we're doing the full test, see how it looks in-game

38:59Consider changing the edge tests to use the edges of the rotating coordinate system

38:59Consider changing the edge tests to use the edges of the rotating coordinate system

38:59Consider changing the edge tests to use the edges of the rotating coordinate system

39:20Blackboard: How to use those edges

39:20Blackboard: How to use those edges

39:20Blackboard: How to use those edges

39:42Get rid of vMin and vMax in readiness to use those edges

39:42Get rid of vMin and vMax in readiness to use those edges

39:42Get rid of vMin and vMax in readiness to use those edges

39:57Blackboard: Our tests

39:57Blackboard: Our tests

39:57Blackboard: Our tests

40:35Implement those tests

40:35Implement those tests

40:35Implement those tests

42:11Compile and view the results in-game

42:11Compile and view the results in-game

42:11Compile and view the results in-game

42:48Change the scale over time

42:48Change the scale over time

42:48Change the scale over time

43:04Blackboard: Optimising these tests

43:04Blackboard: Optimising these tests

43:04Blackboard: Optimising these tests

44:12Implement optimised exclusion tests

44:12Implement optimised exclusion tests

44:12Implement optimised exclusion tests

50:20Fix a couple of things, but not before filling everywhere in the bounding region

50:20Fix a couple of things, but not before filling everywhere in the bounding region

50:20Fix a couple of things, but not before filling everywhere in the bounding region

50:58Check the code

50:58Check the code

50:58Check the code

51:40Find our typo and restore our buffer pre-step

51:40Find our typo and restore our buffer pre-step

51:40Find our typo and restore our buffer pre-step

52:15Re-enable our edge test and consider further work

52:15Re-enable our edge test and consider further work

52:15Re-enable our edge test and consider further work

53:08Q&A

53:08Q&A

53:08Q&A

57:37Implement a proper perpendicular

57:37Implement a proper perpendicular

57:37Implement a proper perpendicular

59:38Blackboard: How we want the Perp to work

59:38Blackboard: How we want the Perp to work

59:38Blackboard: How we want the Perp to work

1:00:26Make that Perp work

1:00:26Make that Perp work

1:00:26Make that Perp work

1:01:45Blackboard: Downsampling and upsampling bitmaps

1:01:45Blackboard: Downsampling and upsampling bitmaps

1:01:45Blackboard: Downsampling and upsampling bitmaps

1:04:05Blackboard: Mipmaps

1:04:05Blackboard: Mipmaps

1:04:05Blackboard: Mipmaps

1:06:07Blackboard: Texture sampling handles anti-aliasing for the alpha'd bitmaps

1:06:07Blackboard: Texture sampling handles anti-aliasing for the alpha'd bitmaps

1:06:07Blackboard: Texture sampling handles anti-aliasing for the alpha'd bitmaps

1:07:57Check out our hilarious little shape and review our progress

1:07:57Check out our hilarious little shape and review our progress

1:07:57Check out our hilarious little shape and review our progress

1:11:52Postpone anything more until tomorrow, with a potential plan of action

1:11:52Postpone anything more until tomorrow, with a potential plan of action

1:11:52Postpone anything more until tomorrow, with a potential plan of action

⏬

Next: 'Textured Quadrilaterals'

⏬