/****************************************************************************** Eulero codice per il calcolo del flusso potenziale su un corpo generico non portante tridimensionale - dal metodo di Hess Smith Copyright (C) 1999 Matteo Lucarelli - matteo@matteolucarelli.net This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ******************************************************************************/ /* SPHereBuiLDer SiMmetric */ /* divisione aree proporzionate */ /* costruzione sfere simmetriche rispetto a z */ #include #include #include #include #define TIPOD float #define PI 3.1415926536 #define punto(a,b,c) *(punto+(a)*12+(b)*3+(c)) void main (void) { int n_par,n_mer,n_elem; int m,n; TIPOD *punto; FILE *fp; int j; TIPOD y,alfa; char nomein[20]; printf("sphere builder as TIPOD\n\n"); printf("Nø paralleli (min 1) :"); scanf("%d",&n_par); printf("Nø meridiani (min 2) :"); scanf("%d",&n_mer); n_par++ ; n_elem = n_par * n_mer ; printf("%d elementi\n",n_elem); punto = (TIPOD *)calloc( 12*n_elem , sizeof(TIPOD) ) ; for(n=0;n