About 97,000 results
Open links in new tab
  1. python - What is the easiest way to make a triangles - Stack Overflow

    Jul 29, 2021 · You can create whatever triangle you want using some math. Here is a function that takes in how big the triangle needs to be (scale), angle between the points (internalAngle) …

  2. Pygame – Drawing Objects and Shapes - GeeksforGeeks

    Oct 31, 2021 · In this article, we are going to see how to draw an object using Pygame. There can be two versions for drawing any shape, it can be a solid one or just an outline of it. You can …

  3. pygame.drawpygame v2.6.0 documentation

    Draw several simple shapes to a surface. These functions will work for rendering to any format of surface. Most of the functions take a width argument to represent the size of stroke (thickness) …

  4. PyGame Drawing Shapes - PyGame Tutorial

    In this section we will begin to look at how you create visuals in Pygame. You will find out how to add shapes to your game. In the subsequent two sections you will learn how to include images …

  5. Triangle meshes with Python and pygame · GitHub

    Triangle meshes with Python and pygame. GitHub Gist: instantly share code, notes, and snippets.

  6. python - Draw triangle's in pygame given only side lengths - Stack Overflow

    Dec 25, 2018 · I have three line lengths and I need to plot a triangle on the screen with them. Say I have: len1 = 30 len2 = 50 len3 = 70 (these are randomly generated) I can draw the first line …

  7. pygame.gfxdrawpygame v2.6.0 documentation

    Draws an unfilled trigon (triangle) on the given surface. For a filled trigon use filled_trigon() . A trigon can also be drawn using polygon() e.g. polygon(surface, ((x1, y1), (x2, y2), (x3, y3)), color)

  8. A python program to draw sierpinski's triangle using pygame

    A python program to draw Sierpinski's triangle using pygame. The Sierpiński triangle (sometimes spelled Sierpinski), also called the Sierpiński gasket or Sierpiński sieve, is a fractal attractive …

  9. How to move and rotate triangle : r/pygame - Reddit

    Mar 24, 2023 · import math import pygame pygame.init() def center_of_triangle(vertices): """ Needs implementation. """ def rotate(angle, point, origin): x = ((point[0] - origin[0]) * …

  10. python - Moving a triangle in pygame - Stack Overflow

    Jan 27, 2020 · I am trying to make a triangle move on the screen. Heres the class i used to define the triangle. class Triangle: def __init__(self): self.points = [[100, 100], [100, 150], [180, 125]] …

Refresh