


^ 2 ) % euclidean distance focal point at %% Rendering % It could be done with figure and plot functions but they are not % designed to display objects on the pixel and sub-pixel scale. depth * imageMax ( 1 )) + imageMax ( 1 ) / 2 % plane of view at depth 1 focal point at distEuclid = sqrt ( x_y_rot ( 1 ,:). depth * imageMax ( 2 )) + imageMax ( 2 ) / 2 % plane of view at depth 1 focal point at plotImCoordY = ( x_y_rot ( 2 ,:). colormap = tic for iFrame = 1 : nFrames disp () image = zeros ( imageMax ) %% calculate perspective theta = thetaList ( iFrame ) R = x_y_rot = R * x_y % rotate plotImCoordX = ( x_y_rot ( 1 ,:).
#Starfield gif generator
% % Jahobr (update Jahobr) = fileparts ( which ( mfilename )) % save files under the same name and at file location uniqueDepth = 200 nFrames = 240 renderDist = 200 % should be smaller or equal then uniqueDepth StarDensity = 0.0005 imageMax = % pixel (height width) subsampPix = 10 % subsampling per pixel in x and y starRenderLimInPixel = 0.4 % diameter at least a x% of a pixel % if too small it flickers for currentCase = 1 : 2 rng ( 1 ) % int rand generator to make GIF repeatable If you dont like the GIF try a differnt value speed = uniqueDepth / nFrames nStars = StarDensity * ( 2 * renderDist * 2 * renderDist * uniqueDepth ) x0 = rand ( 1, nStars ) * renderDist * 2 - renderDist y0 = rand ( 1, nStars ) * renderDist * 2 - renderDist sizze = 60 + rand ( 1, nStars ) * 60 sizze = % copy space behind each other to loop the gif depth = rand ( 1, nStars ) * uniqueDepth depth = sort ( depth ) % makes later rendering more efficient depth = % copy space behind each other to loop the gif switch currentCase case 1 % classic saveName = fname x_y = % copy space behind each other to loop the gif thetaList = zeros ( 1, nFrames ) % rotation case 2 % rot 90° per gif loop saveName = x_y = % copy space behind each other to loop the gif thetaList = linspace ( 0, pi / 2, nFrames + 1 ) % rotation thetaList = thetaList ( 1 : nFrames ) end rawImage. % Inspired by the "Starfield Simulation" Screensaver for Windows.
#Starfield gif code
In this sequence also appear few stars - two brighter and three quite faint.Function StarfieldSimulation % Source code that produces a GIF. On November 29, 2005, Cassini shot a nice sequence from an "encounter" of Janus and Epimetheus.
