phg-vis 1.1.7__py3-none-any.whl → 1.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- phg/__init__.py +80 -2
- phg/phg_to_shader.py +433 -0
- phg/shader_render.py +425 -0
- phg/vis/GCU.dll +0 -0
- phg/vis/vis.exe +0 -0
- phg/visphg.py +8 -5
- phg_vis-1.3.0.dist-info/METADATA +607 -0
- {phg_vis-1.1.7.dist-info → phg_vis-1.3.0.dist-info}/RECORD +11 -9
- phg_vis-1.1.7.dist-info/METADATA +0 -136
- {phg_vis-1.1.7.dist-info → phg_vis-1.3.0.dist-info}/LICENSE +0 -0
- {phg_vis-1.1.7.dist-info → phg_vis-1.3.0.dist-info}/WHEEL +0 -0
- {phg_vis-1.1.7.dist-info → phg_vis-1.3.0.dist-info}/top_level.txt +0 -0
phg_vis-1.1.7.dist-info/METADATA
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: phg_vis
|
|
3
|
-
Version: 1.1.7
|
|
4
|
-
Summary: A package for the PHG modeling language and 3D visualization tool.
|
|
5
|
-
Home-page: https://github.com/panguojun/Coordinate-System
|
|
6
|
-
Author: romeosoft
|
|
7
|
-
Author-email: 18858146@qq.com
|
|
8
|
-
Platform: Windows
|
|
9
|
-
Classifier: Programming Language :: Python :: 3
|
|
10
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
-
Classifier: Operating System :: Microsoft :: Windows
|
|
12
|
-
Requires-Python: >=3.8
|
|
13
|
-
Description-Content-Type: text/markdown
|
|
14
|
-
License-File: LICENSE
|
|
15
|
-
|
|
16
|
-
### `__init__.py`
|
|
17
|
-
|
|
18
|
-
```python
|
|
19
|
-
from phg import VisPHG
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Installation
|
|
23
|
-
|
|
24
|
-
You can install the package using pip:
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
pip install phg
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Overview
|
|
31
|
-
|
|
32
|
-
# PHG - A Minimalist Programming Language for Describing Structures
|
|
33
|
-
|
|
34
|
-
PHG (Programming HyperGraph) is a minimalist programming language inspired by the structure of bacteriophages. It combines concepts from group theory to provide custom overloading of variables and operations, making it uniquely suited for describing complex node structures such as 3D scenes and 2D sprites.
|
|
35
|
-
|
|
36
|
-
## Features
|
|
37
|
-
|
|
38
|
-
- **Node Definition**: Easily define nodes and their properties.
|
|
39
|
-
- **Array and Sequence Support**: Utilize both arrays and sequences for managing data.
|
|
40
|
-
- **Control Statements**: Implement conditional and looping logic.
|
|
41
|
-
- **Function Definitions**: Create custom functions for reusable code.
|
|
42
|
-
- **Tree Structure**: Describe hierarchical data structures effectively.
|
|
43
|
-
- **API Integration**: Access built-in functions for mathematical operations, drawing, and data manipulation.
|
|
44
|
-
|
|
45
|
-
## Basic Syntax
|
|
46
|
-
|
|
47
|
-
### Node Definition
|
|
48
|
-
|
|
49
|
-
```phg
|
|
50
|
-
{
|
|
51
|
-
a {
|
|
52
|
-
p: 1, 0, 0;
|
|
53
|
-
b { p: 2, 0, 0 }
|
|
54
|
-
<a, a, a>
|
|
55
|
-
[a, a, a]
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### Control Statements
|
|
61
|
-
|
|
62
|
-
```phg
|
|
63
|
-
?(condition) { statement } : { else statement };
|
|
64
|
-
@n { statement1 ? (_i = x) ~; statement2; }
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
### Function Definition
|
|
68
|
-
|
|
69
|
-
```phg
|
|
70
|
-
$functionName(args...) { statement $return }
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
## Sequences and Arrays
|
|
74
|
-
|
|
75
|
-
- **Sequence**: `<a, b, c, d>` corresponds to `{a {b {c {d}}}}`
|
|
76
|
-
- **Array**: `[a, b, c, d]` corresponds to `{{a}{b}{c}{d}}`
|
|
77
|
-
|
|
78
|
-
### Example
|
|
79
|
-
|
|
80
|
-
```phg
|
|
81
|
-
node1 {
|
|
82
|
-
pos: 1, 2, 3;
|
|
83
|
-
node2 { x: 1; node3 { y: 1 } }
|
|
84
|
-
}
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
## Built-in Functions
|
|
88
|
-
|
|
89
|
-
- **Math Functions**: `rnd()`, `sin()`, `cos()`
|
|
90
|
-
- **Node Operations**: `im()`, `on()`, `wak()`, `dump()`
|
|
91
|
-
- **Data Conversion**: `tojson()`
|
|
92
|
-
|
|
93
|
-
## Installation
|
|
94
|
-
|
|
95
|
-
You can install PHG via PyPI:
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
pip install phg
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
## Usage
|
|
102
|
-
|
|
103
|
-
To use PHG, simply import the module in your Python project:
|
|
104
|
-
|
|
105
|
-
```python
|
|
106
|
-
import phg
|
|
107
|
-
|
|
108
|
-
# Define your PHG code as a string
|
|
109
|
-
phg_code = """
|
|
110
|
-
{
|
|
111
|
-
a {
|
|
112
|
-
p: 1, 0, 0;
|
|
113
|
-
b { p: 2, 0, 0 }
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
"""
|
|
117
|
-
|
|
118
|
-
# Execute the PHG code
|
|
119
|
-
phg.run(phg_code)
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
## Documentation
|
|
123
|
-
|
|
124
|
-
For more detailed information on syntax, functions, and examples, please refer to the [official documentation](https://your.documentation.link).
|
|
125
|
-
|
|
126
|
-
## Contributing
|
|
127
|
-
|
|
128
|
-
Contributions are welcome! Please feel free to submit issues or pull requests.
|
|
129
|
-
|
|
130
|
-
## License
|
|
131
|
-
|
|
132
|
-
This project is licensed under the MIT License.
|
|
133
|
-
|
|
134
|
-
## Acknowledgements
|
|
135
|
-
|
|
136
|
-
PHG is inspired by concepts from group theory and aims to provide a flexible way to describe complex data structures in programming.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|