Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Simple question about surfaces & images

Please login with a confirmed email address before reporting spam

Hello all,

I have what I think is a very simple problem. I would like to define a 3D geometry from a JPEG/PNG image.

What I have tried., reading the forum as well as examples such as Mount St Helen, Rock Fracture and a few others.

What I do at the moment is;

1) create an image in the definitions.

2) create a parametric surface in the geometry (I have included screen shots to illustrate).


However, I do not appear to be able to generate the surface at all. Have I done something silly?!

I am sure this would only take a moment or two for someone who has used images as the basis for a surface to be able to help. I have been able to create a 3D surface using the interpolation function where I define the grid but this is going to be more involved than doing it directly.

Many thanks for your help,

Rob


2 Replies Last Post 13 gen 2016, 22:43 GMT-5

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 21 giu 2012, 06:43 GMT-4
Hi everyone,

I think I may have solved the problem, kind of.

The issue was resolved by defining the image in Global Definitions not the Model Definitions. Once I did that the image and the Parametric Surface worked.

I am still trying to figure out exactly how to use it, but I am getting there.

There is however a follow on question....

If I have an image, and lets say that white pixels are represented as 1 (the range being 0 to 1), is there a way I can set a condition for the Parametric Surface for values above say 0.5 to be ignored?

The example I am working on is a 2D image showing elevation represented in colour. I can import the image and the parametric surface with no problem, but I would like to ignore all heights below a certain level.

Anyone got any ideas?

something like....

image1(s1,s2) for image1(s1,s2)<0.5 or something similar.

Any ideas would be very welcome!!

Rob
Hi everyone, I think I may have solved the problem, kind of. The issue was resolved by defining the image in Global Definitions not the Model Definitions. Once I did that the image and the Parametric Surface worked. I am still trying to figure out exactly how to use it, but I am getting there. There is however a follow on question.... If I have an image, and lets say that white pixels are represented as 1 (the range being 0 to 1), is there a way I can set a condition for the Parametric Surface for values above say 0.5 to be ignored? The example I am working on is a 2D image showing elevation represented in colour. I can import the image and the parametric surface with no problem, but I would like to ignore all heights below a certain level. Anyone got any ideas? something like.... image1(s1,s2) for image1(s1,s2)

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 13 gen 2016, 22:43 GMT-5
dear rob
may i know how to set the parametric surface in the geometry ? or where i can find it ?
i just import the image import the comsol but i can not go to next step since i do not know where to find the so-called"parametric surface"
dear rob may i know how to set the parametric surface in the geometry ? or where i can find it ? i just import the image import the comsol but i can not go to next step since i do not know where to find the so-called"parametric surface"

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.