Giter VIP home page Giter VIP logo

Comments (4)

halbmy avatar halbmy commented on July 30, 2024

I don't understand your mesh generation

grid = pg.createGrid(x=np.linspace(start_x, end_x, 64), 
                                  y=np.linspace(0, depth, 64))
mesh = mt.createMesh(world, quality=34, grid=grid)

The createMesh function does not have an argument grid, and it always creates a triangular mesh. You can directly use grid, or append a triangular boundary around it.

from gimli.

jcmefra avatar jcmefra commented on July 30, 2024

Thank you for the answer. I tried to just use grid but it outputs something like this:

image

I want to output something like the image I uploaded in the issue, but with a squared mesh so each node has a resistivity value and I can convert it to a matrix. Is that possible? Thank you!

from gimli.

halbmy avatar halbmy commented on July 30, 2024

You mean you would like to populate the grid with markers (and then resistivities) like above?

for c in grid.cells():
    if c.center().y() > -20:
        c.setMarker(1)
    elif if c.center().y() > -30:
        c.setMarker(2)
...
pg.show(grid, markers=True)

from gimli.

halbmy avatar halbmy commented on July 30, 2024

Closing due to inactivity.

from gimli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.