Skip to main content

A PyVista-based 3D trophy visualization tool

Project description

Ghahreman

A PyVista-based 3D trophy visualization tool.

Description

This package provides functionality to create and display a golden trophy with customizable parameters. The trophy consists of two cones connected at their vertices, with the upper cone being larger than the lower one. The trophy includes decorative elements such as disks, a base, spheres, and handles, all rendered in a golden color.

A package for the champion (ghahreman) from the master (ostad).

Installation

You can install the package using pip:

pip install ghahreman

Or using uv:

uv pip install ghahreman

Usage

from ghahreman import Hero

# Create a trophy with default parameters
hero = Hero()

# Display the trophy
hero.display()

# Create a trophy with custom parameters
custom_hero = Hero(
    height1=2.0,          # Height of the upper cone
    radius1=1.0,          # Radius of the upper cone
    resolution=60,        # Resolution of the trophy elements
)

# Display the custom trophy with a white background
custom_hero.display(background_color="white", window_size=(1000, 800))

Parameters

The Hero class accepts the following parameters:

  • height1: Height of the upper cone
  • radius1: Base radius of the upper cone
  • height2: Height of the lower cone (if None, set to one-third of the upper cone's height)
  • radius2: Base radius of the lower cone (if None, set to 80% of the upper cone's radius)
  • resolution: Resolution (number of segments) for the cones and other elements
  • disk_radius: Radius of the horizontal disk at the connection point of the two cones
  • disk_thickness: Thickness of the horizontal disk at the connection point
  • bottom_disk_radius: Radius of the horizontal disk below the lower cone
  • bottom_disk_thickness: Thickness of the horizontal disk below the lower cone
  • cube_size: Size of the cube below the bottom disk
  • cube_height: Height of the cube below the bottom disk
  • sphere_radius: Radius of the small sphere tangent to the upper cone's base
  • handle_thickness: Thickness of the trophy handles

Command Line Usage

After installation, you can also run the package from the command line:

ghahreman

This will display a trophy with default parameters.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Requirements

  • Python 3.6 or higher
  • PyVista 0.34.0 or higher
  • NumPy 1.20.0 or higher

Development

To set up the development environment:

# Clone the repository
git clone https://github.com/Elmino-19/ghahreman.git
cd ghahreman

# Install development dependencies
uv pip install -e ".[dev]"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ghahreman-0.1.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ghahreman-0.1.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file ghahreman-0.1.0.tar.gz.

File metadata

  • Download URL: ghahreman-0.1.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for ghahreman-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c5f2fcac7b383c86084914427c8665fe1b8f213e2359f12da7e169be2fc6045a
MD5 5c71a9c064bdae6f0d72fcd930a7f624
BLAKE2b-256 5720164ade3314ca237db7ec556607b016504382c26f5b25e1bd97107d08f911

See more details on using hashes here.

File details

Details for the file ghahreman-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ghahreman-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for ghahreman-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 53280b9596ee3ee472125d43c518a3377908a7d4a7aad5ad2deb8e6cce38eb9b
MD5 661677c4aa3263a8c3fdf61dd4970efd
BLAKE2b-256 a62f58036c195023b0ea33f0d15b802e19df66ffffa84f252f0547b445884de6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page