File:Level set method.jpg
From formulasearchengine
Jump to navigation
Jump to search
Level_set_method.jpg (800 × 600 pixels, file size: 89 KB, MIME type: image/jpeg)
This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.
Summary
DescriptionLevel set method.jpg | Illustration of en:Level set method. |
Date | 25 November 2004 (original upload date) |
Source | Transferred from en.wikipedia to Commons. |
Author | Olegalexandrov at English Wikipedia |
Licensing
Public domainPublic domainfalsefalse |
This work has been released into the public domain by its author, Olegalexandrov at English Wikipedia. This applies worldwide. In some countries this may not be legally possible; if so: Olegalexandrov grants anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.Public domainPublic domainfalsefalse |
MATLAB source code (public domain)
function level_set_method()
figure(1); clf; % pop up a figure, and clean it up
for i=1:3 % make a loop to draw the six pictures in pairs
level_disp(i);
end
print('-djpeg100', '-r100', 'level_set_method.jpg') % save to file.
function level_disp(p)
Lx=2.5; Ly=2.5; % box is [-Lx Lx] x [-Ly, Ly]
N=60; % number of points (don't make it big, code will be slow)
heights=[0.7+eps, 0.00001, -0.7+eps]; % cut the surface at these heights
height=heights(p); % current cut
[X, Y]=meshgrid(-Lx:(1/N):Lx, -Ly:(1/N):Ly); % X and Y coordinates
Z=height-0.5*(X-1.78).*X.^2.*(X+1.78)-Y.^2; % Z=f(X, Y) -surface
lowest=-4;
[m, n]=size(Z);
for i=1:m
for j=1:n
if Z(i, j)< lowest; % truncate the surface somewhere
Z(i, j)=NaN;
end
end
end
% draw the surface and the plane cut
figure(1); subplot('Position', [(p-1)/3, 0., 0.33, 0.5]); hold on;
surf(X, Y, Z, 'FaceColor','red', 'EdgeColor','none', 'FaceAlpha', 1);
surf(X, Y, zeros(m, n), 'FaceColor','blue', 'EdgeColor','none', 'FaceAlpha', 0.3);
camlight left;lighting phong; % make nice lightning
axis([-Lx Lx -Ly Ly lowest 1.8]); axis equal; axis off; %the coordinate box
view(-23, 34) % angle of view (polar coordinates)
% draw the shape (cross-section)
figure(1); subplot('Position', [(p-1)/3, 0.5, 0.33, 0.5]); % subwindow
[c, stuff] = contour(X, Y, Z, [0, 0]); % draw the contours.
l=c(2, 1);
x=c(1,2:(l+1)); y=c(2,2:(l+1)); % get x and y of contours
H=fill(x, y, 0.6*[1, 1, 1]); set(H, 'EdgeColor', 'none'); % draw the shape
[u, v]=size(c);
if v > l+2 % special case: two connected components
x=c(1,(l+3):(2*l)); y=c(2,(l+3):(2*l)); % contours
hold on; % hold the graph for the second component
H=fill(x, y, 0.6*[1, 1, 1]); set(H, 'EdgeColor', 'none');
end
axis equal; axis off; axis([-Lx Lx -Ly Ly]); % frame size
Original upload log
The original description page was here. All following user names refer to en.wikipedia.
- 2004-11-25 03:20 Olegalexandrov 800×600×8 (90808 bytes) Illustration of level set method. {{PD}}
This math image could be re-created using vector graphics as an SVG file. This has several advantages; see Commons:Media for cleanup for more information. If an SVG form of this image is available, please upload it and afterwards replace this template with
{{vector version available|new image name}} .
It is recommended to name the SVG file “Level set method.svg”—then the template Vector version available (or Vva) does not need the new image name parameter. |
This math image was uploaded in the JPEG format even though it consists of non-photographic data. This information could be stored more efficiently or accurately in the PNG or SVG format. If possible, please upload a PNG or SVG version of this image without compression artifacts, derived from a non-JPEG source (or with existing artifacts removed). After doing so, please tag the JPEG version with {{Superseded|NewImage.ext}} and remove this tag. This tag should not be applied to photographs or scans. If this image is a diagram or other image suitable for vectorisation, please tag this image with {{Convert to SVG}} instead of {{BadJPEG}}. If not suitable for vectorisation, use {{Convert to PNG}}. For more information, see {{BadJPEG}}. |
Items portrayed in this file
depicts
25 November 2004
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 05:19, 2 June 2007 | 800 × 600 (89 KB) | wikimediacommons>Oleg Alexandrov | {{Information |Description= Illustration of en:Level set method. |Source=Originally from [http://en.wikipedia.org en.wikipedia]; description page is/was [http://en.wikipedia.org/w/index.php?title=Image%3ALevel_set_method.jpg here]. |Date=2004-11-25 ( |
File usage
There are no pages that use this file.
Retrieved from "https://en.formulasearchengine.com/wiki/File:Level_set_method.jpg"