alecjacobson / gptoolbox

Matlab toolbox for Geometry Processing.
MIT License
628 stars 169 forks source link

No find: meshgrid, Parameterization QuadCover, #146

Open Mojgan-arch opened 1 year ago

Mojgan-arch commented 1 year ago

I can not find these (mesh grid, Parameterization QuadCover). what should I do?

this page (https://github.com/alecjacobson/gptoolbox_ext) doesn't work.

alecjacobson commented 1 year ago

What is this in reference to?

Mojgan-arch commented 1 year ago

i want to do this code with Matlab. but there are some Errors. I installed gptoolbox completly and took path according location of my file. but when i ask in command windows >> which gptoolbox 'gptoolbox' not found. I am so confused what is problem.

image

also after searching, I found there is extention for gptoolbox in github, unfortunatly github page doesnt work. (https://github.com/alecjacobson/gptoolbox_ext).

Errors: (>> gptoolboxone Warning: Duplicate data points have been detected and removed. Some point indices will not be referenced by the triangulation.

In gptoolboxone (line 26)

Index in position 1 is invalid. Array indices must be positive integers or logical values.

Error in gptoolboxone (line 30) mesh = gptoolbox.mesh(mesh.vertices, mesh.faces);)

Code % Define the size of the rectangle width = 10; height = 5;

% Define the size of the hexagons hex_width = 0.5; hex_height = 0.5*sqrt(3);

% Compute the number of hexagons in each direction n_hex_x = floor(width / hex_width); n_hex_y = floor(height / (hex_height/2))-1;

% Compute the spacing between the hexagons delta_x = hex_width; delta_y = hex_height/2;

% Compute the coordinates of the hexagon vertices x = repmat((0:n_hex_x-1)delta_x,n_hex_y,1); y = repmat((0:n_hex_y-1)delta_y, n_hex_x,1)'; y(2:2:end,:) = y(2:2:end,:) + hex_height/2; [x,y] = meshgrid(x,y); x(:,1:2:end) = x(:,1:2:end)+delta_x/2;

% Create the mesh vertices = [x(:), y(:), zeros(size(x(:)))]; faces = delaunay(x(:), y(:)); mesh = struct('vertices', vertices, 'faces', faces);

% Load the mesh mesh = gptoolbox.mesh(mesh.vertices, mesh.faces);

% Define a parameterization method (quasiconformal mapping) param = gptoolbox.Parameterization.QuadCover(mesh);

% Define an energy functional with anisotropic constraints energy = gptoolbox.AnisoFairingEnergy(mesh, param, 'feature', 'area', 'constraint', 'mean_value', 'alpha', 0.1, 'beta', 1.0, 'gamma', 0.0);

% Solve the optimization problem solver = gptoolbox.Optimizer(energy); solver.run();

% Map the hexagonal pattern to the new parameterization new_vertices = param.get_vertices();

alecjacobson commented 1 year ago

Where did you hear of gptoolbox_ext ? I've never heard of that.

Mojgan-arch commented 1 year ago

I asked chatGPT and it replyed me. it is amazing because your profile name is for github address , (Github repository: https://github.com/alecjacobson/gptoolbox_ex)

ChatGPT: gptoolbox_ex is a Python library that provides a collection of tools and utilities for working with geometric processing (GP) tasks in computer graphics and computer vision. The library is built on top of the Geometric Processing Toolbox (GPT), which is a C++ library developed by the same team.

gptoolbox_ex provides a high-level interface to the GPT library, making it easier to use for researchers and practitioners in the field of geometric processing. It includes a number of modules that cover various aspects of GP, including mesh processing, geometry processing, shape analysis, and more.

Some of the features of gptoolbox_ex include:

Support for various file formats for meshes and point clouds Basic geometric operations such as rotations, translations, and scaling Advanced mesh processing tools such as remeshing, simplification, and subdivision Surface reconstruction and shape analysis tools Visualization and rendering utilities for 3D data Overall, gptoolbox_ex is a powerful and flexible library for performing geometric processing tasks in computer graphics and computer vision. It is open-source and can be used under the MIT license.

Here are some sources for gptoolbox_ex:

Github repository: https://github.com/alecjacobson/gptoolbox_ex Documentation: https://gptoolbox-ex.readthedocs.io/en/latest/ Research paper: https://dl.acm.org/doi/abs/10.1145/3386569.3392469 Project webpage: https://www.cs.toronto.edu/~jacobson/gptoolbox_ex/ These sources provide information on how to download, install, and use gptoolbox_ex in your own projects, as well as documentation on the various features and modules included in the library.

Mojgan-arch commented 1 year ago

Please guide me , how I can solve my errors according to gptoolbox.

alecjacobson commented 1 year ago

Thank you for clarifying. It seems ChatGPT is generating text describing a library that does not actually exist. While the description ChatGPT has generated looks plausible and appears to be based on https://github.com/alecjacobson/gptoolbox/, it has made many factual errors. This library, gptoolbox, is a matlab library (not python) and there is no corresponding C++ library called "Geometric Processing Toolbox (GPT)". There is a library libigl which I maintain if you're interested.