https://github.com/hens-virtuella-varld/2d_data_on_3d_plot
A Python open source project visualizes 2D JSON data on 3D plot.
https://github.com/hens-virtuella-varld/2d_data_on_3d_plot
matplotlib matplotlib-pyplot python python-3 python3
Last synced: 8 months ago
JSON representation
A Python open source project visualizes 2D JSON data on 3D plot.
- Host: GitHub
- URL: https://github.com/hens-virtuella-varld/2d_data_on_3d_plot
- Owner: hens-virtuella-varld
- License: mit
- Created: 2019-02-19T03:45:15.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-05T14:43:51.000Z (over 6 years ago)
- Last Synced: 2025-02-06T12:11:52.918Z (9 months ago)
- Topics: matplotlib, matplotlib-pyplot, python, python-3, python3
- Language: Python
- Homepage:
- Size: 293 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 2d_data_on_3d_plot
A Python open source project visualizes 2D JSON data on 3D plot.
This project's purpose was to visualize DICOM-RT data.
## Requirements
- Python 3
## Setup
```
$ git clone https://github.com/hens-virtuella-varld/2d_data_on_3d_plot.git
$ cd 2d_data_on_3d_plot
(create and activate virtual environment if needed)
$ pip install -r requirements.txt
```
## Execution
```
$ python generate_cube_json.py > sample.json # This generates a sample data.
$ python plot.py sample.json cube
```
## JSON and plot example
An example of cube composed of 3 squares.
```
{
"cube": [
[
{ "x": 0, "y": 0, "z": 0.0 },
{ "x": 1, "y": 0, "z": 0.0 },
{ "x": 1, "y": 1, "z": 0.0 },
{ "x": 0, "y": 1, "z": 0.0 },
{ "x": 0, "y": 0, "z": 0.0 }
],
[
{ "x": 0, "y": 0, "z": 0.5 },
{ "x": 1, "y": 0, "z": 0.5 },
{ "x": 1, "y": 1, "z": 0.5 },
{ "x": 0, "y": 1, "z": 0.5 },
{ "x": 0, "y": 0, "z": 0.5 }
],
[
{ "x": 0, "y": 0, "z": 1.0 },
{ "x": 1, "y": 0, "z": 1.0 },
{ "x": 1, "y": 1, "z": 1.0 },
{ "x": 0, "y": 1, "z": 1.0 },
{ "x": 0, "y": 0, "z": 1.0 }
]
]
}
```

## License
Copyright (c) 2019 [hens-virtuella-varld](https://github.com/hens-virtuella-varld)
The project is licensed under the MIT License.
## Contact
### Regan Y.
E-mail: hens.virtuella.varld@gmail.com
LinkedIn: https://www.linkedin.com/in/regan-y/
I will be happy to talk to you if you have any advices to my project.