{"id":18322537,"url":"https://github.com/tencentarc/arcvis","last_synced_at":"2025-07-22T21:05:13.139Z","repository":{"id":109180083,"uuid":"577655213","full_name":"TencentARC/ArcVis","owner":"TencentARC","description":"Visualization of 3d and 2d components interactively.","archived":false,"fork":false,"pushed_at":"2022-12-13T08:25:01.000Z","size":14824,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-05T23:31:50.452Z","etag":null,"topics":["3d","numpy","plotly","pytorch","visualization"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TencentARC.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-13T08:20:25.000Z","updated_at":"2024-02-04T00:32:54.000Z","dependencies_parsed_at":"2023-04-06T16:38:11.739Z","dependency_job_id":null,"html_url":"https://github.com/TencentARC/ArcVis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TencentARC/ArcVis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TencentARC%2FArcVis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TencentARC%2FArcVis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TencentARC%2FArcVis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TencentARC%2FArcVis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TencentARC","download_url":"https://codeload.github.com/TencentARC/ArcVis/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TencentARC%2FArcVis/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266572404,"owners_count":23950013,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d","numpy","plotly","pytorch","visualization"],"created_at":"2024-11-05T18:25:06.623Z","updated_at":"2025-07-22T21:05:13.124Z","avatar_url":"https://github.com/TencentARC.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ArcVis\n\nThis is a visualization library for 3d/2d plot. It is helpful for developing geometric algorithms and check their correctness.\n\nWe use numpy array for 3d/2d data structure, and many of the geometric function are in torch.\n\nWe provide some basic geometric implementation and visual samples. For more example usage, please visit our repo\n[ArcNerf](https://github.com/TencentARC/ArcNerf). There will be more useful examples using this vis lib.\n\n![Vis](assets/all_vis.gif)\n\n------------------------------------------------------------------------\n\n# plot3d\nWe provide a `draw_3d_components` that is helpful to plot camera/points/rays/lines/sphere/meshes/volume\nwith customized color in all. \n\nFor all point, it should be in world space, or transformed to world space.\nThen change to plt space. The visual space is (x-right, y-down, z-forward).\nBut we show the y values as -y inorder to make y goes downward.\n\n------------------------------------------------------------------------\n## Backend\nWe provide `matplotlib` and `plotly` for visualization. By default it use `plt`.\n\n`Plotly` is good for interactive visualization\nand is able to zoom-in/out, move. We can add `plotly=True` in `draw_3d_components`.\n\n------------------------------------------------------------------------\n## Camera\n- c2w pose: in `(N_cam, 4, 4)`. Local camera models will be created and transformed into world space\n- cam_colors: in `(N_cam, 3)` or `(3,)` can be used to color each or all cams\n- intrinsic: in `(3, 3)` is used to adjust local cam model for actual ray direction.\n\n![Vis](assets/camera.gif)\n\n------------------------------------------------------------------------\n## Points\n- point: in `(N_p, 3)` in world space\n- point_size: is single value used to set each point size\n- point_color: in `(N_p, 3)` or `(3,)` can be used to color each or all points\n\n------------------------------------------------------------------------\n## Lines\n- lines: a list of lines in `(N_pts_in_line, 3)` in world space, total `N_line`,\neach line prints `N_pt_in_line-1` line seg\n- line_width: is single value or list of value used to set each line width.\n- line_colors: in `(N_line, 3)` or `(3,)` can be used to color each or all lines\n\n------------------------------------------------------------------------\n## Meshes\n- meshes: a list of mesh of `(N_tri, 3, 3)` in world space, len is `N_m`\n- mesh_colors: color in `(N_m, 3)` or (3,), applied for each or all mesh\n- face_colors: color in `(N_tri, 3)`, len is `N_m`, for each mesh if set.\n\n![Vis](assets/mesh.gif)\n\n------------------------------------------------------------------------\n## Rays\n- rays: a tuple `(rays_o, rays_d)`, each in `(N_r, 3)`, in world coord. `rays_d` is with actual len, if you want longer arrow, you need to extend `rays_d`\n- ray_colors: color in `(N_r, 3)` or `(3,)`, applied for each or all rays\n- ray_linewidth: width of ray line, by default is 1\n\n## Sphere\n- sphere_radius: draw a sphere with such `radius` if not None\n- sphere_origin: the origin of sphere, by default is `(0, 0, 0)`\n\n![Vis](assets/ray_sphere_pts.gif)\n\n------------------------------------------------------------------------\n## Volume\nA complete volume implementation is in `geometry.volume`. You only input points/lines/faces for visual results.\n- 'grid_pts': grid point, ((n+1)^3, 3). If use corner only, (8,3)\n  - grid_pts_colors: pts_colors in str. If not exist, use `chocolate`.\n  - 'grid_pts_size': pts_size. If not exist, set 20.\n- 'volume_pts': volume point, (n^3, 3)\n  - 'volume_pts_colors: pts_colors in str. If not exist, use `green`.\n  - 'volume_pts_size': pts_size. If not exist, set 20.\n- 'lines': lines of bounding lines or dense lines. list of lines in (2, 3)\n- 'faces': faces of bounding faces or dense faces, np in ((n+1)n^2, 4, 3).\nregroup each face to 2 triangles for visual\n  - face_colors: face_colors in str. If not exist, use `silver`.\n\n![Vis](assets/volume.gif)\n![Vis](assets/ray_volume.gif)\n\n------------------------------------------------------------------------\n## Other:\n- title: title of the fig\n- save_path: if `None`, will show the fig, otherwise save it\n- axis range: update by the component with max values (xyz), show in a cube with same lengths.\n- return_fig: If set to True and save_path is None, will return the fig(plt) or numpy array(plotly) for further usage.\n- show_axis: If False, do not show axis but only the fig. By default True.\n\n------------------------------------------------------------------------\n# plot2d\nIn `plot_2d.py`, we provide a `draw_2d_components` that is\nhelpful to plot points/lines in defined colors with legends. We use `matplotlib` as backend.\n\n------------------------------------------------------------------------\n# Notebook:\n- We provide the python notebook in `draw_3d_examples.ipynb` to use the 3d render \nand `draw_2d_examples.ipynb` to use the 2d drawer.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftencentarc%2Farcvis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftencentarc%2Farcvis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftencentarc%2Farcvis/lists"}