# Fluid.datasetplot~ abstraction for 2D/3D visualization

**URL:** https://discourse.flucoma.org/t/fluid-datasetplot-abstraction-for-2d-3d-visualization/783
**Category:** Pre-Release Toolbox2 Code Sharing
**Created:** [February 20, 2021, 1:40am UTC](https://discourse.flucoma.org/t/fluid-datasetplot-abstraction-for-2d-3d-visualization/783 "2021-02-20T01:40:40Z")
**Posts on this page:** 1
**Showing post:** 83

<div class="post-metadata">

### Author: ![balintlaczko](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/balintlaczko/32/1184_2.png) [@balintlaczko](https://discourse.flucoma.org/u/balintlaczko)
#### Post date: [May 15, 2021, 10:56pm UTC](https://discourse.flucoma.org/t/fluid-datasetplot-abstraction-for-2d-3d-visualization/783/83 "2021-05-15T22:56:52Z")

</div>

Hey guys. Had a nice chat with @rodrigo.constanzo the other day. I think my raycasting muscles are getting stronger. 😌  
This version gets the point closest to where you click the mouse (in the jit.pworld) by casting a ray to (through) where you click, then getting the point, where the angle between the vector from the cam (kinda) to the point has the narrowest angle to the ray. Arguably not the most fail-proof method, but it seems to do the job:

![datasetplot-raycast](https://discourse.flucoma.org/uploads/default/original/2X/6/61140ce3a4f73da315d481f0fffbbb8dc2effea9.gif)

The good thing about it is that the camera can be anywhere and have any orientation, it will (supposedly) work the same way.

[5D plot\_mod.zip](https://discourse.flucoma.org/uploads/short-url/zORLKBBvLelnCmsmod4lvYxCo64.zip) (136.8 KB)

---

_[View the full topic](https://discourse.flucoma.org/t/fluid-datasetplot-abstraction-for-2d-3d-visualization/783)._
