CHLNDDEV / OceanMesh2D

A two-dimensional triangular mesh generator with pre- and post-processing utilities written in pure MATLAB (no toolboxes required) designed specifically to build models that solve shallow-water equations or wave equations in a coastal environment (ADCIRC, FVCOM, WaveWatch3, SWAN, SCHISM, Telemac, etc.).
https://github.com/sponsors/krober10nd
GNU General Public License v3.0
181 stars 65 forks source link

logo? #152

Closed krober10nd closed 3 years ago

krober10nd commented 3 years ago
WPringle commented 3 years ago

Sure, if you come up with a design post it here. I was also thinking this based on the last slide of that talk showing all the logos.

krober10nd commented 3 years ago
Screen Shot 2020-12-03 at 8 37 56 PM
HamishB commented 3 years ago

I'm wondering if you could make a triangle shapefile (triangular holes) and run that through OM2D, so there'd be many smaller triangles within the two big ones and the OM2D software would have created part of its own logo.

krober10nd commented 3 years ago
Screen Shot 2020-12-03 at 10 19 21 PM
clearvars; close all; clc;
%%
% Make a triangle for the logo
pslg= [
    0.2252    0.2226
    0.4418    0.6664
    0.6676    0.2226
    0.2252    0.2226
    NaN NaN];

gdat = geodata('bbox',[0,1;0,1],'pslg',pslg,'h0',500,'window',1);

gdat.inpoly_flip = 1;

fh = edgefx('geodata',gdat,...
    'fs',2);

mshopts = meshgen('ef',fh,'bou',gdat,'plot_on',1,'nscreen',1);
mshopts = mshopts.build;

m = mshopts.grd;

plot(m,'tri',0);

print -dpng -r300 triangle_for_logo

%%
% Make a meshed o
x = 0.5; y = 0.5; 
r =  0.1 ;
th = 0:pi/50:2*pi;
xunit = r * cos(th) + x;
yunit = r * sin(th) + y;

pslg = [xunit', yunit'; NaN NaN]; 

gdat = geodata('bbox',[0,1;0,1],'pslg',pslg,'h0',500,'window',1);

gdat.inpoly_flip = 1;

fh = edgefx('geodata',gdat,...
    'fs',2);

mshopts = meshgen('ef',fh,'bou',gdat,'plot_on',1,'nscreen',1);
mshopts = mshopts.build;

m = mshopts.grd;

plot(m,'tri',0);

print -dpng -r300 o_for_logo
krober10nd commented 3 years ago
Screen Shot 2020-12-03 at 10 22 07 PM
HamishB commented 3 years ago

Since the area within the letters is small, maybe draw a rectangle around everything and fill the space between the bbox and the outside of the letters with triangles, and then leave the letters solid black?

HamishB commented 3 years ago

If lettering is saved as .svg in Inkscape or similar you can get the coords of the letters from inside the .svg text file. Maybe extracting from PostScript is easier as svg might be using bezier curves to define the boundaries of the letters?

HamishB commented 3 years ago

In GRASS: import png with r.in.gdal, then r.to.vect to get polylines of lettering, then v.out.ogr to get a shapefile of the boundaries

krober10nd commented 3 years ago

maybe @HamishB you can try to do what you're suggesting and post it in #153 ?