Commit Graph

122 Commits

Author SHA1 Message Date
Karma Riuk
a64670503a removed before.webm 2023-08-02 19:09:32 +02:00
Arnaud 'Karma' Fauconnet
d6a2727755
finally got videos to work!!
god github's video thing is scuffed...
2023-08-02 19:03:40 +02:00
Karma Riuk
de4e741d6a trying to make the video in the readme work :) 2023-08-02 18:07:03 +02:00
Karma Riuk
2b844647f4 trying to make the video in the readme work :) 2023-08-02 18:05:30 +02:00
Karma Riuk
e9f90bd11c Added before vs after to readme 2023-08-02 17:55:43 +02:00
Karma Riuk
87b4febc5d Added README with abstract 2023-08-02 17:34:11 +02:00
Karma Riuk
082acc4451 Added random color generation to the polygons, also made so that the
color of the vector indicating speed is the same as the color of the
polygon, but a little lighter
2023-06-13 13:50:07 +02:00
Karma Riuk
79ac43f05c Set max length for arrow heads 2023-06-13 13:49:48 +02:00
Karma Riuk
89e250dcba Removed the passing of the mass through parameters. Now the mass is
determined by the area of the polygon
2023-05-19 16:31:38 +02:00
Karma Riuk
ce0cf102ba Reformated collisions.cc 2023-05-19 16:29:05 +02:00
Karma Riuk
a424fec9a9 Now when polygons collide, they get moved by the overlap to ensure that
they don't get stuck in the following frames, it works very well and
Carza is happy :))))))
2023-05-19 15:24:11 +02:00
Karma Riuk
92e51a96be Added the destroy method for the polygons 2023-05-19 10:18:49 +02:00
Karma Riuk
00dad13b2f Commented out some couts 2023-05-18 11:24:08 +02:00
Karma Riuk
784eb823ec Updated Makefile 2023-05-18 11:23:54 +02:00
Karma Riuk
697d958bbf Added the commandline argument to enable polygons 2023-05-18 11:23:31 +02:00
Karma Riuk
d2e95a7d93 Added entry to gitignore 2023-05-18 11:19:58 +02:00
Karma Riuk
a774b8d517 Removed a lot of useless fluff 2023-05-17 15:40:55 +02:00
Karma Riuk
deeb237f45 Added a more complex starting setting 2023-05-17 15:38:05 +02:00
Karma Riuk
40dde35f19 Added restitution coefficient control (introduced a lot of unwanted
behaviour, but fixable)
2023-05-17 13:38:46 +02:00
Karma Riuk
a6c4771d1a Added gravity to polygons 2023-05-17 13:33:07 +02:00
Karma Riuk
7b5273b9bf Added gravity vector for polygons in gravity.h 2023-05-17 13:30:05 +02:00
Karma Riuk
958a784371 Reformated gravity.h 2023-05-17 13:29:38 +02:00
Karma Riuk
2bba3155da Added the gravity vector method for polygons (kinda blindly copied and
pasted it from the ball version, hope it works)
2023-05-17 13:27:11 +02:00
Karma Riuk
7df64d460c Reformated gravity.cc 2023-05-17 13:25:36 +02:00
Karma Riuk
487b5fe00b Fixed most of the bugs of the collision detection (still some cases
there)
2023-05-17 13:22:34 +02:00
Karma Riuk
b4203884ef Changed to delta so that the edge cases happen less (since the 'move
less' each frame)
2023-05-17 13:21:43 +02:00
Karma Riuk
398cae3b24 Added toString method to polygons, together with fields "label" and
"collided_with"
2023-05-17 13:21:06 +02:00
Karma Riuk
399949876f Made the draw method of vec2d const so that compiler stops complaining 2023-05-17 13:20:40 +02:00
Karma Riuk
3c2335235e Added labels to polygons to make it clear what is getting printed 2023-05-17 13:19:57 +02:00
Karma Riuk
33cbe4a683 Added the possibility to go frame by frame pressing '.' 2023-05-17 13:18:51 +02:00
Karma Riuk
37a76e3e8d Revamped collision detection, missing the vertex inside vertex case
(which is happening a bit too often imho)
2023-05-06 14:07:47 +02:00
Karma Riuk
2cfa921547 Added a general polygon to the initial state 2023-05-06 14:06:45 +02:00
Karma Riuk
c0d4343b77 Added general polygon generation WITH CORRECT INERTIA YUHUU 2023-05-06 14:05:45 +02:00
Karma Riuk
ad841588ad Refactored collision detection (last version before changing the algo) 2023-04-25 12:09:07 +02:00
Karma Riuk
6b049eb831 Added new polygons in polygons_init_state() and now drawing the point of
impact and the normal vector in that point
2023-04-25 12:05:39 +02:00
Karma Riuk
02f60aaa8a Added == operator to vec2d 2023-04-25 12:04:52 +02:00
Karma Riuk
699490fefc Added the possibility of drawing a vector 2023-04-25 12:02:56 +02:00
Karma Riuk
bf9545a7a0 Added regular polygons and started implementation of arbitrary (general)
polygons
2023-04-25 12:01:51 +02:00
Karma Riuk
4a7e5834d3 Quick refactoring and reformating 2023-04-21 09:01:35 +02:00
Karma Riuk
1c58530e98 Now the borders of the windows are walls of infinite mass 2023-04-10 14:40:16 +02:00
Karma Riuk
c7b9500bc4 Fixed inertia for rectangles 2023-04-10 14:39:36 +02:00
Karma Riuk
d0de911344 got the speed working (yay) but the angular velocity that results is superrrr low, thus not creating any rotation after impact, wierd... 2023-04-02 21:53:21 +02:00
Karma Riuk
7dc54ddfe5 Made the angular speed a double 2023-03-25 14:03:07 +01:00
Karma Riuk
4d14f2a30b Added wall bouncing logic (flawed); added bounding box computation and display 2023-03-25 10:57:32 +01:00
Karma Riuk
d6bf526459 Generator now makes the polygons origin at their center of mass, easier for rotation 2023-03-20 15:33:35 +01:00
Karma Riuk
e6a3979de1 Added a generator for polygons to make the init easier 2023-03-14 23:10:31 +01:00
Karma Riuk
48a1b3ade4 Added the possibility to set the fields of the polygon class in a functional programming style 2023-03-14 23:09:48 +01:00
Karma Riuk
37198d4669 fixed implementaion mistake 2023-03-14 22:00:55 +01:00
Karma Riuk
9fd87b7f29 Simple implementation of polygons, you can create them in the init and draw them 2023-03-14 21:46:36 +01:00
Karma Riuk
7a5bf13575 Added a way to output vec2d in an easy way 2023-03-14 21:45:44 +01:00