Skip to content

Parth-Kambli/torchstuff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TorchStuff

Calculate the Polygon area and length (perimeter).

Table of Contents

Installation

pip3 install torchstuff

Usage

import torch
from torchstuff.polygon import Polygon

# Example vertices
vertices = torch.tensor([[0., 0.], [0., 1.], [1., 1.], [1., 0.], [0., 0.]])

# Create Polygon object
polygon = Polygon(vertices)

# Access properties
area = polygon.area
length = polygon.length

print(f"Area: {area}, Length: {length}")

Contributing

Just me for now

About

Calculate the Polygon area and length (perimeter).

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages