Skip to content

Instantly share code, notes, and snippets.

@keijiro
Created January 18, 2023 02:15
Show Gist options
  • Select an option

  • Save keijiro/2ff7b058df5f8cd2dd05a837021aead7 to your computer and use it in GitHub Desktop.

Select an option

Save keijiro/2ff7b058df5f8cd2dd05a837021aead7 to your computer and use it in GitHub Desktop.

Revisions

  1. keijiro created this gist Jan 18, 2023.
    11 changes: 11 additions & 0 deletions teapot_convert.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    import sys

    pcount = int(sys.stdin.readline().rstrip())

    for i in range(0, pcount):
    sys.stdin.readline()
    for j in range(0, 16):
    coord = sys.stdin.readline().rstrip().split()
    coord = list(map(lambda x: float(x) * 0.2, coord))
    coord[2] = max(0, coord[2] - 0.075 * 0.2)
    print(" math.float3({0:6.3f}f, {2:6.3f}f, {1:6.3f}f),".format(*coord))