00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include "plplotP.h"
00025
00026
00027
00028
00029
00030
00031
00032 PLINT
00033 plP_dcpcx(PLFLT x)
00034 {
00035 return (ROUND(plsc->phyxmi + plsc->phyxlen * x));
00036 }
00037
00038
00039
00040 PLINT
00041 plP_dcpcy(PLFLT y)
00042 {
00043 return (ROUND(plsc->phyymi + plsc->phyylen * y));
00044 }
00045
00046
00047
00048 PLINT
00049 plP_mmpcx(PLFLT x)
00050 {
00051 return (ROUND(plsc->phyxmi + plsc->xpmm * x));
00052 }
00053
00054
00055
00056 PLINT
00057 plP_mmpcy(PLFLT y)
00058 {
00059 return (ROUND(plsc->phyymi + plsc->ypmm * y));
00060 }
00061
00062
00063
00064 PLINT
00065 plP_wcpcx(PLFLT x)
00066 {
00067 if (!finite(x)) return PLINT_MIN;
00068 return (ROUND(plsc->wpxoff + plsc->wpxscl * x));
00069 }
00070
00071
00072
00073 PLINT
00074 plP_wcpcy(PLFLT y)
00075 {
00076 if (!finite(y)) return PLINT_MIN;
00077 return (ROUND(plsc->wpyoff + plsc->wpyscl * y));
00078 }
00079
00080
00081
00082
00083
00084
00085
00086 PLFLT
00087 plP_pcdcx(PLINT x)
00088 {
00089 return (PLFLT) ((x - plsc->phyxmi) / (double) plsc->phyxlen);
00090 }
00091
00092
00093
00094 PLFLT
00095 plP_pcdcy(PLINT y)
00096 {
00097 return (PLFLT) ((y - plsc->phyymi) / (double) plsc->phyylen);
00098 }
00099
00100
00101
00102 PLFLT
00103 plP_mmdcx(PLFLT x)
00104 {
00105 return ((PLFLT) (x * plsc->xpmm / ABS(plsc->phyxma - plsc->phyxmi)));
00106 }
00107
00108
00109
00110 PLFLT
00111 plP_mmdcy(PLFLT y)
00112 {
00113 return ((PLFLT) (y * plsc->ypmm / ABS(plsc->phyyma - plsc->phyymi)));
00114 }
00115
00116
00117
00118 PLFLT
00119 plP_wcdcx(PLFLT x)
00120 {
00121 return ((PLFLT) (plsc->wdxoff + plsc->wdxscl * x));
00122 }
00123
00124
00125
00126 PLFLT
00127 plP_wcdcy(PLFLT y)
00128 {
00129 return ((PLFLT) (plsc->wdyoff + plsc->wdyscl * y));
00130 }
00131
00132
00133
00134 PLFLT
00135 plP_scdcx(PLFLT x)
00136 {
00137 return ((PLFLT) (plsc->spdxmi + (plsc->spdxma - plsc->spdxmi) * x));
00138 }
00139
00140
00141
00142 PLFLT
00143 plP_scdcy(PLFLT y)
00144 {
00145 return ((PLFLT) (plsc->spdymi + (plsc->spdyma - plsc->spdymi) * y));
00146 }
00147
00148
00149
00150
00151
00152
00153
00154 PLFLT
00155 plP_dcmmx(PLFLT x)
00156 {
00157 return ((PLFLT) (x * ABS(plsc->phyxma - plsc->phyxmi) / plsc->xpmm));
00158 }
00159
00160
00161
00162 PLFLT
00163 plP_dcmmy(PLFLT y)
00164 {
00165 return ((PLFLT) (y * ABS(plsc->phyyma - plsc->phyymi) / plsc->ypmm));
00166 }
00167
00168
00169
00170 PLFLT
00171 plP_wcmmx(PLFLT x)
00172 {
00173 return ((PLFLT) (plsc->wmxoff + plsc->wmxscl * x));
00174 }
00175
00176
00177
00178 PLFLT
00179 plP_wcmmy(PLFLT y)
00180 {
00181 return ((PLFLT) (plsc->wmyoff + plsc->wmyscl * y));
00182 }
00183
00184
00185
00186
00187
00188
00189
00190 PLFLT
00191 plP_dcscx(PLFLT x)
00192 {
00193 return ((PLFLT) ((x - plsc->spdxmi) / (plsc->spdxma - plsc->spdxmi)));
00194 }
00195
00196
00197
00198 PLFLT
00199 plP_dcscy(PLFLT y)
00200 {
00201 return ((PLFLT) ((y - plsc->spdymi) / (plsc->spdyma - plsc->spdymi)));
00202 }
00203
00204
00205
00206
00207
00208
00209
00210
00211 PLFLT
00212 plP_w3wcx(PLFLT x, PLFLT y, PLFLT z)
00213 {
00214 return ((PLFLT) ((x - plsc->basecx) * plsc->cxx +
00215 (y - plsc->basecy) * plsc->cxy));
00216 }
00217
00218
00219
00220
00221 PLFLT
00222 plP_w3wcy(PLFLT x, PLFLT y, PLFLT z)
00223 {
00224 return ((PLFLT) ((x - plsc->basecx) * plsc->cyx +
00225 (y - plsc->basecy) * plsc->cyy +
00226 (z - plsc->ranmi) * plsc->cyz));
00227 }
00228
00229
00230
00231
00232 PLFLT
00233 plP_w3wcz(PLFLT x, PLFLT y, PLFLT z)
00234 {
00235 return ((PLFLT) ((x - plsc->basecx) * plsc->czx +
00236 (y - plsc->basecy) * plsc->czy +
00237 (z - plsc->ranmi) * plsc->czz));
00238 }