How can create a cube using the center data point? And how can find how many data points inside in this cube? - cube

I want to create cube by using center point of red color point .Then want to find how many points exist inside this cube . Using python or Machine learning technology anyone can help me ?

Related

Is it possible to drag-snap a point of a shape being edited by the drawing manager to another shape's point location?

I'd like a user to be able to draw a polygon using the Azure Maps Drawing Manager and have the ability to move a point of the polygon to near one of another polygon's points and have the dragged point snap to the same location such that the resulting 2 points would be the same.
I know there is snap capability with a grid but don't see a sample for this behaviour?
The ultimate goal is to prevent polygon overlaps, assuming the intersecting shared line of adjoining shapes is excluded from determination of which polygon a point resides within.
I can allow a user to manually draw and get as close as possible of course, and provide some assertion to confirm no polygons overlap but would additionally like a nice snap-to-point experience if possible.
You can find hundreds of samples for Azure Maps here: https://samples.azuremaps.com/
As you noted, the snapping grid is likely the best place to start in your scenario. Here are some specific samples of this:
https://samples.azuremaps.com/?sample=use-a-snapping-grid
https://samples.azuremaps.com/?sample=snap-grid-options
The following sample is an example of a custom snapping scenario where the routing service is used to snap a drawn line to a route (the route part can be swapped out for custom logic): https://samples.azuremaps.com/?sample=snap-drawn-line-to-roads

LABVIEW matrix to graylevel picture

I'm using camera mightex bte-b050-u
and using the example the company gave using labview I created a 2D array and want to transform it into a grayscale photo. I have no idea how to do it since I don't know labview and using the code in matlab it has many errors.
I'd appreciate if someone could please let me know how I can take this 2D array and represent it as a grayscale photo. (beam profiler if you wish)
P.s
I have no idea why they ignored 28 "words" so I just tried going with that logic and transform it to my camera according to the pixels I have.
I would encourage you to read about intensity graph.
And use the linked article which would explain on how to change the color scale on the graph.
Changing the color on an Intensity Graph
Here is an example that converts a 2-D array into an image: Convert Array to Image.
In short, use Flatten Pixmap.vi, Draw Flattened Pixmap.vi, and Picture to Pixmap.vi from the NI-IMAQ palette, which is part of the Vision Application Software SDK.

Draw hole in solid shape using x3d/vrml

I'm new to x3d/vrml and I'm trying figure out how to punch a hole in a solid shape. For example, a 6x6x2 cube with a smaller 2x2x2 cube in the middle to create a hollow shape. I have tried extrusion and indexedFaceSet without success. I haven't found any tutorials that show me how to do this. Therefore, A working example would be useful to me as well as others .
Normally you don't create this kind of shapes manually. Of course it is possible to use the IndexedFaceSet node in order to achieve this but it's much better and easier to use a tool (e.g. 3D Studio Max) where you can create shapes using a graphical interface. Then you export the file to X3D or VRML or whatever and you'll see the IndexedFaceSet there and possibly the complexity of the node (I mean the node values which are nearly impossible to determine by yourself).
In your specific case you could use 4 cubes that are intersecting and leaving a hole in the middle...this would be just a tricky solution.

WPF 3D and Helix 3D toolkit graphics with ~500,000 triangles in one viewport- optimizing

I am new to stack overflow and new to 3D graphics programming. I have been given the task of creating an app that will read in data (currently I am reading from a delimited text file, but eventually will read from data arrays) and to graphically display the data in 3D. The data is x,y,z coordinates read from a 3D scanner which is scanning logs. I need to show the 3D representation of these logs on screen, from 4 different angles. I am reading the data into a 2-dimensional Point3D array and then using it to create 3D models in a HelixViewport3D. I use a nested for loop to check that the data points in the array are within certain x,Z bounds- and if they are I need to create a triangle out of that data. Once the entire array is passed through, I add the Model3DGroup to the children of my viewport:
topModel.Content = topGroup;
this.mainViewport.Children.Add(topModel);
It takes about 8 seconds for this to take place and zooming,panning, rotating are very very slow with all this data on the screen (around 500,000 triangles). Are there any ways to improve performance of WPF 3D graphics? I actually don't need to be able to zoom/pan/rotate in the finished app but it is helpful for debugging. The final app will simply be the same model shown statically 4 different ways, from different sides. However, I need to be able to read in the data and get the graphics to display in 1-5 seconds. Any help is greatly appreciated, and I hope my question is fairly clear!
EDIT: After doing some more digging into vertex buffering, this is what I need to do. I am using way too many points. If anyone can point me to some literature on doing vertex/index buffering in c#, it would be greatly appreciated!
I have solved this issue. Thanks for the input Capt Skyhawk! You saying that you doubted this was a WPF3D shortcoming helped me look in the right places. My problem was that the way I wrote this made every triangle it's own ModelVisual3D!! I re-wrote the code to contain only 3 GeometryModel3D (sp?) objects, and all the triangles are placed in a MeshGeometry3D and then the mesh is used to create a model. This made the models render in < 0.1 seconds. I now have a new issue- for some reason only about half of the triangles are showing up in the model in my viewports. I'm not sure why, though it may be that I have too many Point3D points or too many triangle indices in my mesh.
I doubt this is a shortcoming in WPF3D. It's more than likely the loading process. Parsing a text file with 500,000 triangles(even more points!) is where the bulk of the processing time is being spent.
If the loading of the text file is not being included in the 8 seconds, something is very wrong.
Are you using index buffers? If not, you're shooting yourself in the foot with that many vertices.

Problem in Shapefiles

i need a help
i have a shape file that continue 3716 polygon record and want to draw this shape file where some of those polygons need to have a specified color
OR WANT a search technique to search this map for a point (lat-long) and get it's belong polygon but not by searching all polygons
i tries all, OpenJump-Source code, GeoTools,....
In GeoTools you can follow the Style tutorial to show you how to display your shapefile. There is no way to carry out a point in polygon search without at least examining the bounding box of each polygon but the GeoTools Query Lab will talk you through the basics of setting up a query (and if your shapefile has a spatial index then it will be quick enough).

Resources