File:Tubular neighborhood3.png

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(928 × 1,289 pixels, file size: 24 KB, MIME type: image/png)

Captions

Captions

Add a one-line explanation of what this file represents
Description Illustration of en:Tubular neighborhood
Source Made with en:Matlab
Author Oleg Alexandrov 03:01, 1 June 2007 (UTC)
Permission
(Reusing this file)
Public domain
Public domain I, the copyright holder of this work, release this work into the public domain. This applies worldwide.
In some countries this may not be legally possible; if so:
I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.


Source code (MATLAB)[edit]

% illustration of tubular neighborhood
function main()

   a=0; b=2*pi; N = 100;
   X=linspace(a, b, N);
   Y=sin(X);
   ll = 4; % length of lines perpendicular to the curve
   
   thin_line = 2;
   thick_line = 4;
   
%  will draw lines perpendicular to the graph of Y=f(X) at
%  points separted by length of 'spacing'
   spacing = 0.04;
   M = floor(spacing*N); 

% colors
   red=[0.867 0.06 0.14];
   blue = [0, 129, 205]/256;
   green = [0, 200,  70]/256;
   gray=0.8*[1, 1, 1];
   
   figure(1); clf; hold on; axis equal; axis off;
   view(23, 36);

   % plot the lines
   for k=1:N
      
      p = (k-1)*M+2;
      if p >= N
		 break;
      end
      
      plot3([X(p), X(p)], [Y(p), Y(p)], [-ll, ll], 'color', red, 'linewidth', thin_line)
	  
   end

   % plot the curve
   plot3(X, Y, 0*X, 'linewidth', thick_line, 'color', blue);

   saveas(gcf, 'Tubular_neighborhood3.eps', 'psc2')
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 “Tubular neighborhood3.svg”—then the template Vector version available (or Vva) does not need the new image name parameter.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current04:48, 2 June 2007Thumbnail for version as of 04:48, 2 June 2007928 × 1,289 (24 KB)Oleg Alexandrov (talk | contribs){{Information |Description=Illustration of en:Tubular neighborhood |Source=Made with en:Matlab |Date= |Author= Oleg Alexandrov 03:01, 1 June 2007 (UTC) |Permission=Public domain |other_versions= }} {{PD-self}} ==Matlab

There are no pages that use this file.

File usage on other wikis

The following other wikis use this file: