Applications, Examples and Libraries

Share your work here

This application calculates the number of photons reaching a camera sensor for a given exposure. A blackbody model of the sun is generated. The "Sunny 16" rule for exposure is demonstrated. Calculations are done using units.Photon_Exposure_Array.mw

Photon ExposureNULLNULL

Blackbody Model of the Sun

    h := Units:-Standard:-`*`(Units:-Standard:-`*`(0.6626069e-33, Units:-Standard:-`^`(Unit('m'), 2)), Units:-Standard:-`*`(Unit('kg'), Units:-Standard:-`/`(Unit('s')))): 

Plank Constant       

  kb := Units:-Standard:-`*`(Units:-Standard:-`*`(0.1380650e-22, Units:-Standard:-`*`(Units:-Standard:-`^`(Unit('m'), 2), Units:-Standard:-`/`(Units:-Standard:-`^`(Unit('s'), 2)))), Units:-Standard:-`*`(Unit('kg'), Units:-Standard:-`/`(Unit('K')))): 

Boltzman Constant  

c := Units:-Standard:-`*`(0.2997925e9, Units:-Standard:-`*`(Unit('m'), Units:-Standard:-`/`(Unit('s')))):  ``

Light Speed

Rsun := Units:-Standard:-`*`(Units:-Standard:-`*`(6.955, Units:-Standard:-`^`(10, 8)), Unit('m')): ``

Sun Radius  

Re_orb := Units:-Standard:-`*`(Units:-Standard:-`*`(1.496, Units:-Standard:-`^`(10, 11)), Unit('m')): ``

Earth Orbit

Tsun := Units:-Standard:-`*`(5800, Unit('K')): ``

Sun Color Temperature     

 tf_atm := .718: 

Transmission Factor  

 

Sun: Spectral Radiant Exitance to Earth: Spectral Irradiance                   

  "M(lambda):=(2*Pi*h*c^(2))/((lambda)^(5))*1/((e)^((h*c)/(lambda*kb*Tsun))-1)*(Rsun/(Re_orb))^(2)*tf_atm:" NULL

evalf(M(Units:-Standard:-`*`(555, Unit('nm')))) = 1277414308.*Units:-Unit(('kg')/(('m')*('s')^3))"(->)"1.277414308*Units:-Unit(('W')/(('nm')*('m')^2))NULL

Photopic Relative Response VP vs λ

 

csvFile := FileTools[Filename]("/VPhotopic.csv")NULL = "VPhotopic.csv"NULL

VPdata := ImportMatrix(csvFile) = Vector(4, {(1) = ` 471 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order})NULLNULL

 

`λP` := [seq(1 .. 4000)]:

VP := ArrayInterpolation(VPdata, `λP`):             (ArrayInterpolation for x,y data VPdata returns y' for new x data lambdaP)

NULLVParray := [`$`([`λP`[n], VP[n]], n = 1 .. 4000)]:                     

Mearth := [`$`([n, Units:-Standard:-`*`(Units:-Standard:-`*`(M(Units:-Standard:-`*`(n, Unit('nm'))), Unit('nm')), Units:-Standard:-`*`(Units:-Standard:-`^`(Unit('s'), 3), Units:-Standard:-`/`(Unit('kg'))))], n = 1 .. 4000)]:````

``

dualaxisplot(plot([Mearth], lambda = 300 .. 900, style = line, color = [blue], labels = ["λ (nm)", "M (W/nm m^2)"], title = "Spectral Radiant Exitance of the Sun", titlefont = ["ARIAL", 15], legend = [Exitance], size = [800, 300]), plot([VParray], style = line, color = [green], labels = ["λ (nm)", "Relative Response"], legend = [Units:-Standard:-`*`(Units:-Standard:-`*`(Photopic, Relative), Response)]))

 

``

 

 

 

Illuminance in Radiometric and Photometric Units:

E__r := sum(Units:-Standard:-`*`(M(Units:-Standard:-`*`(lambda, Unit('nm'))), Unit('nm')), lambda = 200 .. 4000) = 984.7275549*Units:-Unit(('kg')/('s')^3)"(->)"984.7275549*Units:-Unit(('W')/('m')^2)NULL

NULL

E__po := Units:-Standard:-`*`(Units:-Standard:-`*`(683.002, Units:-Standard:-`*`(Unit('lm'), Units:-Standard:-`/`(Unit('W')))), sum(Units:-Standard:-`*`(Units:-Standard:-`*`(VP[lambda], M(Units:-Standard:-`*`(lambda, Unit('nm')))), Unit('nm')), lambda = 200 .. 4000)) = HFloat(91873.47376063903)*Units:-Unit('lx')NULL

Translation from Illuminance to Luminance for Reflected Light;

 

Object Reflectance          R__o:      

Object Luminance           L__po := proc (R__o) options operator, arrow; R__o*E__po/(Pi*Unit('sr')) end proc:                evalf(L__po(1)) = HFloat(29244.234968360346)*Units:-Unit(('cd')/('m')^2) 

 

Illuminance of a Camera Sensor  Eps applied for time texp determines Luminous Exposure Hp;

Ideal Illuminance is determined by the exposure time texp, effective f-number N and to a less extent the angle to the optical axis θ;

 

• 

H       Luminous Exposure

• 

Eps     Illuminance to the Camera

• 

N                                               Effective F-Number

• 

texp             Exposure Time

• 

θ        Angle to the Optical Axis    

 

E__ps_ideal = Units:-Standard:-`*`(Units:-Standard:-`*`(Units:-Standard:-`*`(Pi, Units:-Standard:-`/`(4)), L__po), Units:-Standard:-`*`(Units:-Standard:-`^`(cos(theta), 4), Units:-Standard:-`/`(Units:-Standard:-`^`(N, 2)))):

H__p_ideal = Units:-Standard:-`*`(E__ps_ideal, t__exp):

 

The camera meter determines the exposure time texp to balance the object luminance, reflectance and effective f-number. It does this based on an internal constant k and the camera ISO s.

• 

s        ISO Gain (Based on saturation at 3 stops above the average scene luminance)

• 

k       Reflected Light Meter Calibration Constant      k__m := Units:-Standard:-`*`(Units:-Standard:-`*`(12.5, Unit('lx')), Unit('s')):  

                                                                                                  for Nikon, Canon and Sekonic

• 

c        Incident Light Meter Calibration Constant       c__m := Units:-Standard:-`*`(Units:-Standard:-`*`(250, Unit('lx')), Unit('s')):        

                                                                                                  for Sekonic with flat domeNULL

N^2/t__exp = `#mrow(mi("\`E__po\`"),mo("⋅"),mi("s"))`/c__m                        (Incident Light Meter)  NULL 

Units:-Standard:-`*`(Units:-Standard:-`^`(N, 2), Units:-Standard:-`/`(t__exp)) = Units:-Standard:-`*`(`#mrow(mi("\`L__po\`"),mo("⋅"),mi("s"))`, Units:-Standard:-`/`(k__m)):                        (Reflected Light Meter)

NULL

Solve for H in terms of the Camera Meter Constant k and s

 

Es = Units:-Standard:-`*`(Units:-Standard:-`*`(Units:-Standard:-`*`(Pi, Units:-Standard:-`/`(4)), Lo), Units:-Standard:-`*`(Units:-Standard:-`^`(cos(theta), 4), Units:-Standard:-`/`(Units:-Standard:-`^`(N, 2)))): NULL

t = Units:-Standard:-`*`(Units:-Standard:-`*`(km, Units:-Standard:-`^`(N, 2)), Units:-Standard:-`/`(Units:-Standard:-`*`(Lo, s))):NULL

NULL

NULL

H = Es*t

H = Units:-Standard:-`*`(Units:-Standard:-`*`(Units:-Standard:-`*`(Units:-Standard:-`*`(Pi, Units:-Standard:-`/`(4)), Lo), Units:-Standard:-`*`(Units:-Standard:-`^`(cos(theta), 4), Units:-Standard:-`/`(Units:-Standard:-`^`(N, 2)))), Units:-Standard:-`*`(Units:-Standard:-`*`(km, Units:-Standard:-`^`(N, 2)), Units:-Standard:-`/`(Units:-Standard:-`*`(Lo, s))))"(=)"H = (1/4)*Pi*cos(theta)^4*km/sNULLNULL

 t = H/Es

t = Units:-Standard:-`*`(Units:-Standard:-`*`(Units:-Standard:-`*`(Pi, Units:-Standard:-`/`(4)), Units:-Standard:-`*`(Units:-Standard:-`*`(Units:-Standard:-`^`(cos(theta), 4), km), Units:-Standard:-`/`(s))), Units:-Standard:-`/`(Units:-Standard:-`*`(Units:-Standard:-`*`(Units:-Standard:-`*`(Pi, Units:-Standard:-`/`(4)), Lo), Units:-Standard:-`*`(Units:-Standard:-`^`(cos(theta), 4), Units:-Standard:-`/`(Units:-Standard:-`^`(N, 2))))))"(=)"t = km*N^2/(Lo*s)NULLNULL

H__p := proc (s, theta) options operator, arrow; (1/4)*Pi*k__m*cos(theta)^4/s end proc:                                              

  evalf(H__p(100, 0)) = 0.9817477044e-1*Units:-Unit(('cd')*('s')/('m')('radius')^2)"(->)"0.9817477044e-1*Units:-Unit(('lx')*('s'))NULL

 

Note:  Meters are typically set for a scene reflectance 3 stops below 100% or 12.5%.

           

  E__ps := proc (N, R__o, theta) options operator, arrow; (1/4)*Pi*Unit('sr')*R__o*E__po*cos(theta)^4/(Pi*Unit('sr')*N^2) end proc:               

 evalf(E__ps(16, Units:-Standard:-`/`(Units:-Standard:-`^`(2, 3)), 0)) = HFloat(11.215023652421756)*Units:-Unit('lx')                                                                                                   

t__exp_ideal := proc (N, s, R__o) options operator, arrow; H__p(s, theta)/E__ps(N, R__o, theta) end proc:                                     

  evalf(t__exp_ideal(16, 100, Units:-Standard:-`/`(Units:-Standard:-`^`(2, 3)))) = HFloat(0.008753862094289947)*Units:-Unit('s') NULL NULL

 

 

Actual exposure time includes typical lens losses;

 m := Units:-Standard:-`/`(80):``

Magnification  

  T := .9:``

Lens Transmittance

 F := 1.03:``

Lens Flare

V := 1: ``

Vignetting

 

                                                  ``

Total Lens Efficiency

q := Units:-Standard:-`*`(Units:-Standard:-`*`(Units:-Standard:-`*`(T, F), V), Units:-Standard:-`^`(Units:-Standard:-`+`(1, Units:-Standard:-`-`(m)), 2)):                                      evalf(q) = .9039698438NULL

 

Replacing Eps with q*Eps we get the "Sunny 16" relation between exposure time and ISO;  NULL

t__exp := proc (N, s, R__o) options operator, arrow; H__p(s, theta)/(q*E__ps(N, R__o, theta)) end proc:NULL               evalf(t__exp(16, 100, Units:-Standard:-`/`(Units:-Standard:-`^`(2, 3)))) = HFloat(0.009683798806264942)*Units:-Unit('s')NULL

t__exp_alt := proc (N, s, R__o) options operator, arrow; k__m*N^2*Pi/(s*q*R__o*E__po) end proc:                  evalf(t__exp_alt(16, 100, Units:-Standard:-`/`(Units:-Standard:-`^`(2, 3)))) = HFloat(0.00968379880412244)*Units:-Unit('s') 

• 

The Number of Photons NP Reaching the Sensor Area A;

• 

Circle of confusion for 24x36mm "Full Frame" for 1 arcminute view at twice the diagonal:

                          A__cc := Units:-Standard:-`*`(Units:-Standard:-`*`(Pi, Units:-Standard:-`^`(Units:-Standard:-`*`(12.6, Unit('`μm`')), 2)), Units:-Standard:-`/`(4)):    

     

• 

  Sensor Bandwidth                                          Photopic Response VP

• 

  Exposure Time for Zone 5: Rscene=12.5% , Saturation in Zone 8 Rscene=100%

• 

  Camera ISO differs from Saturation ISO. Typical Saturation ISO is 2300 when the camera is set to 3200. See DxoMark.

 

NULL

The average number of photons for exposure time based on Reflectance of the scene  relative to the metered value:    

Zone 5;   R__meter := R__scene: 

NP := proc (s, R__o, theta) options operator, arrow; (1/4)*t__exp(N, s, R__meter)*A__cc*q*R__scene*cos(theta)^4*(sum(VP[lambda]*M(lambda*Unit('nm'))*Unit('nm')*lambda*Unit('nm')/(h*c), lambda = 200 .. 4000))/N^2 end proc: 

                                                                               evalf(NP(2300, 1, Units:-Standard:-`*`(0, Unit('deg')))) = HFloat(2191.5645712603696)  NULL

Zone 8;       R__meter := Units:-Standard:-`*`(R__scene, Units:-Standard:-`/`(Units:-Standard:-`^`(2, 3))):   NULL

NP__sat := proc (s, theta) options operator, arrow; (1/4)*t__exp(N, s, R__meter)*A__cc*q*R__scene*cos(theta)^4*(sum(VP[lambda]*M(lambda*Unit('nm'))*Unit('nm')*lambda*Unit('nm')/(h*c), lambda = 200 .. 4000))/N^2 end proc:  NULL

                                                                              evalf(NP__sat(2300, Units:-Standard:-`*`(0, Unit('deg')))) = HFloat(17532.516570082957)NULL

NULL

 

Approximate Formula

 

H__sat := proc (s__sat) options operator, arrow; H__p(s__sat, 0)*E__ps(N, 1, 0)/E__ps(N, 1/8, 0) end proc:      

                                                                                       evalf(H__sat(s__sat)) = HFloat(78.53981635)*Units:-Unit(('cd')*('s')/('m')('radius')^2)/s__satNULLNULL

Average Visible Photon Energy

P__e_ave := Units:-Standard:-`*`(Units:-Standard:-`/`(Units:-Standard:-`+`(850, -350)), sum(Units:-Standard:-`*`(Units:-Standard:-`*`(h, c), Units:-Standard:-`/`(Units:-Standard:-`*`(lambda, Unit('nm')))), lambda = 350 .. 850)):                    evalf(P__e_ave) = 0.3533174192e-18*Units:-Unit('J') 

NPtyp := proc (s__sat) options operator, arrow; H__sat(s__sat)*A__cc/(683.002*(Unit('lm')/Unit('W'))*P__e_ave) end proc: 

                               evalf(NPtyp(2300)) = HFloat(17644.363333654386)"(->)"HFloat(17644.363333654386)NULL

NULL

 

Download Photon_Exposure_Array.mw

Obsolete

See my Camera Profiler application instead.

 

This application creates DNG matrices by optimizing Delta E from a raw photo of x-rites color checker. The color temperature for the photograph is also estimated.  Inputs are raw data from RawDigger and generic camera color response from DXO Mark.

Initialization

   

NULL

NULL

NULL

NULL

NULL

XYZoptical to RGB to XYZdata

 

 

Sr,g,b is the relative spectral transmittance of the filter array not selectivity for XY or Z of a given color.

Pulling Sr,g,b out of the integral assumes they are scalars. For example Sr attenuates X, Y and Z by the same amount.

Raw Balance is not White Point Adaptation.

The transmission loss of Red and Blue pixels relative to green is compensated by D=inverse(S). The relation to incident chromaticity, xy is unchanged as S.D=1.

(See Bruce Lindbloom; "Spectrum to XYZ" and "RGB/XYZ Matrices" also, Marcel Patek; "Transformation of RGB Primaries")

 

 

X = (Int(I*xbar*S, lambda))/N:

Y = (Int(I*ybar*S, lambda))/N:

Z = (Int(I*zbar*S, lambda))/N:

N = Int(I*ybar, lambda):

• 

XYZ to RGB

(Vector(3, {(1) = R_Tbb, (2) = G_Tbb, (3) = B_Tbb})) = (Matrix(3, 3, {(1, 1) = XR*Sr, (1, 2) = YR*Sr, (1, 3) = ZR*Sr, (2, 1) = XG*Sg, (2, 2) = YG*Sg, (2, 3) = ZG*Sg, (3, 1) = XB*Sb, (3, 2) = YB*Sb, (3, 3) = ZB*Sb})).(Vector(3, {(1) = X_Tbb, (2) = Y_Tbb, (3) = Z_Tbb}))

NULL

(Vector(3, {(1) = R_Tbb, (2) = G_Tbb, (3) = B_Tbb})) = (Matrix(3, 3, {(1, 1) = Sr, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = Sg, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = Sb})).(Matrix(3, 3, {(1, 1) = XR, (1, 2) = YR, (1, 3) = ZR, (2, 1) = XG, (2, 2) = YG, (2, 3) = ZG, (3, 1) = XB, (3, 2) = YB, (3, 3) = ZB})).(Vector(3, {(1) = X_Tbb, (2) = Y_Tbb, (3) = Z_Tbb}))

 

Camera_Neutral = (Matrix(3, 3, {(1, 1) = Sr, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = Sg, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = Sb})).(Matrix(3, 3, {(1, 1) = XR, (1, 2) = YR, (1, 3) = ZR, (2, 1) = XG, (2, 2) = YG, (2, 3) = ZG, (3, 1) = XB, (3, 2) = YB, (3, 3) = ZB})).(Vector(3, {(1) = X_wht, (2) = Y_wht, (3) = Z_wht}))

NULL

NULL

NULL

• 

RGB to XYZ (The extra step of adaptation to D50 is included below)

 

(Vector(3, {(1) = X_D50, (2) = Y_D50, (3) = Z_D50})) = (Matrix(3, 3, {(1, 1) = XTbbtoXD50, (1, 2) = YTbbtoXD50, (1, 3) = ZTbbtoXD50, (2, 1) = XTbbtoYD50, (2, 2) = YTbbtoYD50, (2, 3) = ZTbbtoYD50, (3, 1) = XTbbtoZD50, (3, 2) = YTbbtoZD50, (3, 3) = ZTbbtoZD50})).(Matrix(3, 3, {(1, 1) = RX*Dr, (1, 2) = GX*Dg, (1, 3) = BX*Db, (2, 1) = RY*Dr, (2, 2) = GY*Dg, (2, 3) = BY*Db, (3, 1) = RZ*Dr, (3, 2) = GZ*Dg, (3, 3) = BZ*Db})).(Vector(3, {(1) = R_Tbb, (2) = G_Tbb, (3) = B_Tbb})) NULL

NULL

(Vector(3, {(1) = X_D50, (2) = Y_D50, (3) = Z_D50})) = (Matrix(3, 3, {(1, 1) = XTbbtoXD50, (1, 2) = YTbbtoXD50, (1, 3) = ZTbbtoXD50, (2, 1) = XTbbtoYD50, (2, 2) = YTbbtoYD50, (2, 3) = ZTbbtoYD50, (3, 1) = XTbbtoZD50, (3, 2) = YTbbtoZD50, (3, 3) = ZTbbtoZD50})).(Matrix(3, 3, {(1, 1) = RX, (1, 2) = GX, (1, 3) = BX, (2, 1) = RY, (2, 2) = GY, (2, 3) = BY, (3, 1) = RZ, (3, 2) = GZ, (3, 3) = BZ})).(Matrix(3, 3, {(1, 1) = Dr, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = Dg, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = Db})).(Vector(3, {(1) = R_Tbb, (2) = G_Tbb, (3) = B_Tbb}))

NULL

(Vector(3, {(1) = X_D50, (2) = Y_D50, (3) = Z_D50})) = (Matrix(3, 3, {(1, 1) = RX_D50, (1, 2) = GX_D50, (1, 3) = BX_D50, (2, 1) = RY_D50, (2, 2) = GY_D50, (2, 3) = BY_D50, (3, 1) = RZ_D50, (3, 2) = GZ_D50, (3, 3) = BZ_D50})).(Matrix(3, 3, {(1, 1) = Dr, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = Dg, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = Db})).(Vector(3, {(1) = R_Tbb, (2) = G_Tbb, (3) = B_Tbb}))

NULL

(Vector(3, {(1) = X_D50wht, (2) = Y_D50wht, (3) = Z_D50wht})) = (Matrix(3, 3, {(1, 1) = RX_D50, (1, 2) = GX_D50, (1, 3) = BX_D50, (2, 1) = RY_D50, (2, 2) = GY_D50, (2, 3) = BY_D50, (3, 1) = RZ_D50, (3, 2) = GZ_D50, (3, 3) = BZ_D50})).(Matrix(3, 3, {(1, 1) = Dr, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = Dg, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = Db})).Camera_Neutral

NULL

Functions

   

NULL

Input Data

   

NULL

Solve for Camera to XYZ D50 and T

   

NULL

 

 

For all real a, the partial sums sn= sum((-1)^k (k^(1/k) -a), k=1..n) are bounded so that their limit points form an interval [-1.+  the MRB constant +a, MRB constant] of length 1-a, where the MRB constant is limit(sum((-1)^k*(k^(1/k)), k = 1 ..2*N),N=infinity).

For all complex z, the upper limit point of  sn= sum((-1)^k (k^(1/k) -z), k=1..n) is the  the MRB constant.

We see that maple knows the basics of this because when we enter sum((-1)^k*(k^(1/k)-z), k = 1 .. n) 

maple gives

sum((-1)^k*(k^(1/k)-z), k = 1 .. n)

 

marvinrayburns.com

Aujourd’hui, je suis ravis d’annoncer la disponibilité d’une large banque de questions françaises supportant les enseignements du secondaire et de l’enseignement supérieur. Ce contenu didactique est disponible via le MapleTA Cloud, et également grâce au lien de téléchargement ci-dessous.

Lien de téléchargement de la banque de questions françaises

Ces questions sont librement et gratuitement accessibles, et vous pouvez les utiliser directement sur vos propres évaluations et exercices dans MapleTA, ou les éditer et modifier pour les adapter à vos besoins.

Le contenu de cette banque de questions françaises traite de sujets pour les classes et enseignements pré-bac, post-bac pour en majorité les matières scientifiques.

Les matières traitées par niveaux et domaines sont:

Lycées :

  • Electricité
  • Équations Différentielles
  • Gravitation universelle
  • Langues
  • Maths I
  • Maths II
  • Physique
  • Chimie
  • Mécanique

Enseignement supérieur (Post-Bac) :

  • Astrobiologie
  • Introduction au Calcul pour la Biologie
  • Chimie
  • Déplacement d'onde
  • Electricité & Magnétisme
  • Maths pour l’économie
  • Maths Post-Bac
  • Mécanique Angulaire
  • Mécanique des Fluides
  • Mécanique linéaire
  • Physique Post-Bac
  • Electrocinétique
  • Matériau
  • Mécanique des Fluides
  • Thermodynamique

Jonny Zivku
Maplesoft Product Manager, Maple T.A.

Several Maple T.A. users have developed comprehensive sets of question content and assignments to support full courses in Maple T.A. These questions are available through the Maple T.A. Cloud, and we have decided to also post the associated course modules on Maple Primes as an alternative way of accessing this content.

Below you will find a link to the Introductory Calculus Maple T.A.. course module developed by Keele University.

This testing content is freely distributed, and can be used in your own Maple T.A. tests either as-is, or with edits.

These questions are designed to accompany the first semester of an introductory honours calculus course. The course is intended primarily for students who need or expect to pursue further studies in mathematics, physics, chemistry, engineering and computer science. With over 250 question, topics include: basic material about functions, polynomials, logs and exponentials, the concept of the derivative, and lots of practise exercises for finding derivatives and integrals, and material about series.

Jonny Zivku
Maplesoft Product Manager, Maple T.A.

Several Maple T.A. users have developed comprehensive sets of question content and assignments to support full courses in Maple T.A. These questions are available through the Maple T.A. Cloud, and we have decided to also post the associated course modules on Maple Primes as an alternative way of accessing this content.

Below you will find a link to the Introductory Calculus for Biological Sciences Maple T.A.. course module developed by the University of Guelph.

This testing content is freely distributed, and can be used in your own Maple T.A. tests either as-is, or with edits.

The Introductory Calculus for Biological Sciences course module is designed to cover a single-semester introductory calculus course for biological sciences students at the first-year university level. The questions are designed to span the topics listed below, allowing for practice, homework or testing throughout the semester.

Topics include:

  • Introduction to Functions
  • Composite and Inverse Functions
  • Trigonometric Functions
  • Logarithms and Exponents
  • Sequences and Finite Series
  • Limits and Continuity
  • Derivatives
  • Curve Sketching
  • Differentials
  • Linear Approximation
  • Taylor Polynomials
  • Difference Equations
  • Log-Log Graphs
  • Anti-Differentiation
  • Definite Integrals

Jonny Zivku
Maplesoft Product Manager, Maple T.A.

Several Maple T.A. users have developed comprehensive sets of question content and assignments to support full courses in Maple T.A. These questions are available through the Maple T.A. Cloud, and we have decided to also post the associated course modules on Maple Primes as an alternative way of accessing this content.

Below you will find a link to the Introductory Mathematical Economics Maple T.A.. course module developed by the University of Guelph.

This testing content is freely distributed, and can be used in your own Maple T.A. tests either as-is, or with edits.

The Introductory Mathematical Economics course module is designed to cover a single-semester course in mathematical economics for economics and commerce students at the second-year university level. The questions are designed to span the topics listed below, allowing for practice, homework or testing throughout the semester.

Topics include:

  • Rules of Differentiation
  • First Order Differential Equations
  • Higher Order Derivatives
  • Optimization in One Variable
  • Second Order Conditions for Optimization
  • Systems of Linear Equations
  • Optimization with Direct Restrictions on Variables
  • Over Determined and Under Determined Systems
  • Matrix Representation of Systems
  • Gauss Jordan
  • Matrix Operations
  • Types of Matrices
  • Determinants and Inverses
  • Partial Differentiation
  • Second Order Partial Derivatives
  • Multivariate Optimization
  • Second Order Conditions for Multivariate Optimization
  • Multivariate Optimization with Direct Restrictions of Variables
  • Constrained Optimization and the Lagrangean Method
  • Second Order Conditions for Constrained Optimization

Jonny Zivku
Maplesoft Product Manager, Maple T.A.

Several Maple T.A. users have developed comprehensive sets of question content and assignments to support full courses in Maple T.A. These questions are available through the Maple T.A. Cloud, and we have decided to also post the associated course modules on Maple Primes as an alternative way of accessing this content.

Below you will find a link to the Introductory Electricity & Magnetism Maple T.A.. course module developed by the University of Guelph.

This testing content is freely distributed, and can be used in your own Maple T.A. tests either as-is, or with edits.

The Introductory Electricity & Magnetism course module is designed to cover a single-semester course in electricity and magnetism for physical sciences students at the first-year university level. The questions are designed to span the topics listed below, allowing for practice, homework or testing throughout the semester. Using the Maple engine that is part of Maple TA, a custom grading engine has been developed to provide even more flexible grading of scalar and vector responses. This partial grading engine can be configured to, among other things, assign part marks for missing units, transposed or missing vector components or missing algebraic terms.


Topics include:

  • Cross Products
  • Coulomb’s Law
  • Electric Fields
  • Point Charge Distributions
  • Continuous Charge Distributions (Integration)
  • Electric Potential
  • Electric Potential Energy
  • Electromotive Force
  • Resistance
  • Capacitance
  • Kirchhoff’s Laws
  • Magnetic Fields
  • Magnetic Fields Due to Current Carrying Wires
  • Forces on Wires in Magnetic Fields
  • Forces on Charges in Electric and/or Magnetic Fields
  • EM Waves
  • Two Source Interference
  • Double Slit Interference
  • Single Slit Diffraction
  • Diffraction Gratings

Jonny Zivku
Maplesoft Product Manager, Maple T.A.

Several Maple T.A. users have developed comprehensive sets of question content and assignments to support full courses in Maple T.A. These questions are available through the Maple T.A. Cloud, and we have decided to also post the associated course modules on Maple Primes as an alternative way of accessing this content.

Below you will find a link to the Statistics Maple T.A.. course module developed by the University of Guelph.

This testing content is freely distributed, and can be used in your own Maple T.A. tests either as-is, or with edits.

The Statistics course module is designed to cover a single-semester course in statistics for science students at the second-year university level. The questions are designed to span the topics listed below, allowing for practice, homework or testing throughout the semester. The questions are mainly of an applied nature and do not delve very deeply into the underlying mathematical theory.

Topics:

  • Introduction to Statistics
  • Descriptive Statistics
  • Basic Probability
  • Discrete Random Variables
  • Continuous Random Variables
  • Sampling Distributions
  • Inference for Means
  • Inference for Proportions
  • Inference for Variances
  • Chi-square Tests for Count Data
  • One-Way ANOVA
  • Simple Linear Regression and Correlation

Jonny Zivku
Maplesoft Product Manager, Maple T.A.

Several Maple T.A. users have developed comprehensive sets of question content and assignments to support full courses in Maple T.A. These questions are available through the Maple T.A. Cloud, and we have decided to also post the associated course modules on Maple Primes as an alternative way of accessing this content.

Below you will find a link to the Statistics Maple T.A.. course module developed by the University of Waterloo.

This testing content is freely distributed, and can be used in your own Maple T.A. tests either as-is, or with edits.

The Statistics content is used in introductory statistics courses at the University of Waterloo, and has been used regularly over several years. The over 700 questions are clearly organized by topic, and provide extensive feedback to students.


Topics include:

  • Basics
  • Confidence Intervals
  • Continuous Distribution
  • Discrete Multivariate
  • Discrete Probability
  • Graphical Analysis
  • Hypothesis Testing
  • Numerical Analysis for Statistics
  • Probability
  • Sampling Distributions

Jonny Zivku
Maplesoft Product Manager, Maple T.A.

Several Maple T.A. users have developed comprehensive sets of question content and assignments to support full courses in Maple T.A. These questions are available through the Maple T.A. Cloud, and we have decided to also post the associated course modules on Maple Primes as an alternative way of accessing this content.

Below you will find a link to the Calculus 1 Maple T.A.. course module developed by the University of Guelph. This course material also forms part of Teaching Calculus with Maple: A Complete Kit, which provides lectures notes, Maple demonstrations, Maple T.A. assignments, and more for teaching both Calculus 1 and Calculus 2.

This testing content is freely distributed, and can be used in your own Maple T.A. tests either as-is, or with edits.

The Calculus 1 course module is designed to accompany the first semester of an introductory honours calculus course. The course is intended primarily for students who need or expect to pursue further studies in mathematics, physics, chemistry, engineering and computer science.

Topics include:

  • trigonometry including the compound angle formulas
  • inequalities and absolute values
  • limits and continuity using rigorous definitions, the derivative and various applications (extreme, related rates, graph sketching)
  • Rolle's Theorem and the Mean Value Theorem for derivatives
  • the differential and anti-differentiation
  • the definite integral with application to area problems
  • the Fundamental Theorem of Calculus
  • logarithmic and exponential functions
  • the Mean Value Theorem for Integrals

The Calculus 2 course module is designed to accompany the second semester of an introductory honours calculus course.

Topics include:

  • inverse trigonometric functions
  • hyperbolic functions
  • L'Hôpital's Rule
  • techniques of integration
  • parametric equations
  • polar coordinates
  • Taylor and MacLaurin series
  • functions or two or more variables
  • partial derivatives
  • multiple integration

Jonny Zivku
Maplesoft Product Manager, Maple T.A.

I would like to pay attention to a series of applications by Samir Khan
http://www.maplesoft.com/applications/view.aspx?SID=153600
http://www.maplesoft.com/applications/view.aspx?SID=153599
http://www.maplesoft.com/applications/view.aspx?SID=153596
http://www.maplesoft.com/applications/view.aspx?SID=153598
My congratulations to the author on his work well done. New capacities of Global Optimization Toolbox are spectacular. For example, in the first application  an optimization
problem in 101 variables under 5050 nonlinear  constraints
(other than 202 bounds) is solved.
I think it requires a very powerful comp and much time.
I tried that  problem for n=20 with the good old DirectSearch
on my comp (4 GB RAM, Pentium Dual-Core CPU E5700@3GHz) by

soln2 := DirectSearch:-GlobalSearch(rc, {cons1, cons2, rc >= 0,
seq(`and`(vars[i] >= -70, vars[i] <= 70), i = 1 .. 2*n), rc <= 70},
variables = vars, method = quadratic, number = 140, solutions = 1,
evaluationlimit = 20000)

and obtained not so bad rc=69.9609360106765 (whereas www.packomania.com gives rc=58.4005674790451137175957) in about one hour.

Packing_by_DS.mw
For n=50 the memory of my comp cannot allocate calculations or the obtained result by the Search command is far away from the one in packomania.

 

Here is an example of manipulating an Array of pixels. I chose the x-rite ColorChecker as a model so there would be published results to check my work. A number of details about color spaces have become clear through this exercise. The color adaptation process was modeled by converting betweenXYZ and LMS. Different black points may be selected depending on how close to zero illuminance one would accept as a good model. 

I look forward to extending this work to verify and improve the color calibration of my photography. Also some experimentation with demosaicing should be possible.

Initialization

 

restart

with(LinearAlgebra):

unprotect(gamma):``

NULL

x-rite Colorchecker xyY Matrix

  CCxyY_D50 := Matrix(4, 6, {(1, 1) = Vector(3, {(1) = .4316, (2) = .3777, (3) = .1008}), (1, 2) = Vector(3, {(1) = .4197, (2) = .3744, (3) = .3495}), (1, 3) = Vector(3, {(1) = .2760, (2) = .3016, (3) = .1836}), (1, 4) = Vector(3, {(1) = .3703, (2) = .4499, (3) = .1325}), (1, 5) = Vector(3, {(1) = .2999, (2) = .2856, (3) = .2304}), (1, 6) = Vector(3, {(1) = .2848, (2) = .3911, (3) = .4178}), (2, 1) = Vector(3, {(1) = .5295, (2) = .4055, (3) = .3118}), (2, 2) = Vector(3, {(1) = .2305, (2) = .2106, (3) = .1126}), (2, 3) = Vector(3, {(1) = .5012, (2) = .3273, (3) = .1938}), (2, 4) = Vector(3, {(1) = .3319, (2) = .2482, (3) = 0.637e-1}), (2, 5) = Vector(3, {(1) = .3984, (2) = .5008, (3) = .4446}), (2, 6) = Vector(3, {(1) = .4957, (2) = .4427, (3) = .4357}), (3, 1) = Vector(3, {(1) = .2018, (2) = .1692, (3) = 0.575e-1}), (3, 2) = Vector(3, {(1) = .3253, (2) = .5032, (3) = .2318}), (3, 3) = Vector(3, {(1) = .5686, (2) = .3303, (3) = .1257}), (3, 4) = Vector(3, {(1) = .4697, (2) = .4734, (3) = .5981}), (3, 5) = Vector(3, {(1) = .4159, (2) = .2688, (3) = .2009}), (3, 6) = Vector(3, {(1) = .2131, (2) = .3023, (3) = .1930}), (4, 1) = Vector(3, {(1) = .3469, (2) = .3608, (3) = .9131}), (4, 2) = Vector(3, {(1) = .3440, (2) = .3584, (3) = .5894}), (4, 3) = Vector(3, {(1) = .3432, (2) = .3581, (3) = .3632}), (4, 4) = Vector(3, {(1) = .3446, (2) = .3579, (3) = .1915}), (4, 5) = Vector(3, {(1) = .3401, (2) = .3548, (3) = 0.883e-1}), (4, 6) = Vector(3, {(1) = .3406, (2) = .3537, (3) = 0.311e-1})})

NULL

NULL

M := RowDimension(CCxyY_D50) = 4NULL

N := ColumnDimension(CCxyY_D50) = 6

NULL

Convert xyY to XYZ

   

NULL

CCXYZ_D50 := C_xyY_to_XYZ(CCxyY_D50):

CCXYZ_D50 = Matrix(4, 6, {(1, 1) = Vector(3, {(1) = .1152, (2) = .1008, (3) = 0.509e-1}), (1, 2) = Vector(3, {(1) = .3918, (2) = .3495, (3) = .1922}), (1, 3) = Vector(3, {(1) = .1680, (2) = .1836, (3) = .2571}), (1, 4) = Vector(3, {(1) = .1091, (2) = .1325, (3) = 0.529e-1}), (1, 5) = Vector(3, {(1) = .2419, (2) = .2304, (3) = .3344}), (1, 6) = Vector(3, {(1) = .3042, (2) = .4178, (3) = .3462}), (2, 1) = Vector(3, {(1) = .4071, (2) = .3118, (3) = 0.500e-1}), (2, 2) = Vector(3, {(1) = .1232, (2) = .1126, (3) = .2988}), (2, 3) = Vector(3, {(1) = .2968, (2) = .1938, (3) = .1015}), (2, 4) = Vector(3, {(1) = 0.852e-1, (2) = 0.637e-1, (3) = .1078}), (2, 5) = Vector(3, {(1) = .3537, (2) = .4446, (3) = 0.895e-1}), (2, 6) = Vector(3, {(1) = .4879, (2) = .4357, (3) = 0.606e-1}), (3, 1) = Vector(3, {(1) = 0.686e-1, (2) = 0.575e-1, (3) = .2138}), (3, 2) = Vector(3, {(1) = .1498, (2) = .2318, (3) = 0.790e-1}), (3, 3) = Vector(3, {(1) = .2164, (2) = .1257, (3) = 0.385e-1}), (3, 4) = Vector(3, {(1) = .5934, (2) = .5981, (3) = 0.719e-1}), (3, 5) = Vector(3, {(1) = .3108, (2) = .2009, (3) = .2356}), (3, 6) = Vector(3, {(1) = .1360, (2) = .1930, (3) = .3094}), (4, 1) = Vector(3, {(1) = .8779, (2) = .9131, (3) = .7397}), (4, 2) = Vector(3, {(1) = .5657, (2) = .5894, (3) = .4894}), (4, 3) = Vector(3, {(1) = .3481, (2) = .3632, (3) = .3029}), (4, 4) = Vector(3, {(1) = .1844, (2) = .1915, (3) = .1592}), (4, 5) = Vector(3, {(1) = 0.846e-1, (2) = 0.883e-1, (3) = 0.759e-1}), (4, 6) = Vector(3, {(1) = 0.299e-1, (2) = 0.311e-1, (3) = 0.269e-1})})NULL

XYZ D50 to XYZ D65

   

NULL

CCXYZ_D65 := XYZ_D50_to_D65(CCXYZ_D50):

CCXYZ_D65 = Matrix(4, 6, {(1, 1) = Vector(3, {(1) = .1110, (2) = 0.996e-1, (3) = 0.670e-1}), (1, 2) = Vector(3, {(1) = .3785, (2) = .3459, (3) = .2533}), (1, 3) = Vector(3, {(1) = .1726, (2) = .1861, (3) = .3403}), (1, 4) = Vector(3, {(1) = .1045, (2) = .1318, (3) = 0.690e-1}), (1, 5) = Vector(3, {(1) = .2470, (2) = .2329, (3) = .4430}), (1, 6) = Vector(3, {(1) = .3030, (2) = .4206, (3) = .4556}), (2, 1) = Vector(3, {(1) = .3850, (2) = .3044, (3) = 0.651e-1}), (2, 2) = Vector(3, {(1) = .1340, (2) = .1165, (3) = .3966}), (2, 3) = Vector(3, {(1) = .2855, (2) = .1895, (3) = .1347}), (2, 4) = Vector(3, {(1) = 0.867e-1, (2) = 0.642e-1, (3) = .1431}), (2, 5) = Vector(3, {(1) = .3334, (2) = .4409, (3) = .1142}), (2, 6) = Vector(3, {(1) = .4600, (2) = .4275, (3) = 0.777e-1}), (3, 1) = Vector(3, {(1) = 0.777e-1, (2) = 0.606e-1, (3) = .2839}), (3, 2) = Vector(3, {(1) = .1428, (2) = .2315, (3) = .1022}), (3, 3) = Vector(3, {(1) = .2063, (2) = .1216, (3) = 0.512e-1}), (3, 4) = Vector(3, {(1) = .5578, (2) = .5888, (3) = 0.906e-1}), (3, 5) = Vector(3, {(1) = .3073, (2) = .1990, (3) = .3131}), (3, 6) = Vector(3, {(1) = .1451, (2) = .1976, (3) = .4092}), (4, 1) = Vector(3, {(1) = .8646, (2) = .9129, (3) = .9759}), (4, 2) = Vector(3, {(1) = .5579, (2) = .5895, (3) = .6458}), (4, 3) = Vector(3, {(1) = .3434, (2) = .3633, (3) = .3997}), (4, 4) = Vector(3, {(1) = .1818, (2) = .1915, (3) = .2100}), (4, 5) = Vector(3, {(1) = 0.836e-1, (2) = 0.884e-1, (3) = .1002}), (4, 6) = Vector(3, {(1) = 0.296e-1, (2) = 0.311e-1, (3) = 0.355e-1})})

NULL

NULLConvert XYZ to Lab (D50 or D65 White Point)

 

NULLNULL

Reference White Point for D50

NULL

X_D50wht := XYZ_D50wht[1] = .96422NULL

Y_D50wht := XYZ_D50wht[2] = 1NULL

Z_D50wht := XYZ_D50wht[3] = .82521

NULL

Lab Conversion Constants;

`&epsilon;` := 216/24389:

kappa := 24389/27:

NULL

fx_D50 := proc (XYZ) options operator, arrow; piecewise(`&epsilon;` < XYZ[1]/X_D50wht, (XYZ[1]/X_D50wht)^(1/3), XYZ[1]/X_D50wht <= `&epsilon;`, (1/116)*kappa*XYZ[1]/X_D50wht+4/29) end proc
                

NULLNULL

NULL

 
fy_D50 := proc (XYZ) options operator, arrow; piecewise(`&epsilon;` < XYZ[2]/Y_D50wht, (XYZ[2]/Y_D50wht)^(1/3), XYZ[2]/Y_D50wht <= `&epsilon;`, (1/116)*kappa*XYZ[2]/Y_D50wht+4/29) end proc
NULLNULL

NULLNULL

fz_D50 := proc (XYZ) options operator, arrow; piecewise(`&epsilon;` < XYZ[3]/Z_D50wht, (XYZ[3]/Z_D50wht)^(1/3), XYZ[3]/Z_D50wht <= `&epsilon;`, (1/116)*kappa*XYZ[3]/Z_D50wht+4/29) end proc
NULL

XYZ_to_Lab_D50 := proc (XYZ) options operator, arrow; `<,>`(116*fy_D50(XYZ)-16, 500*fx_D50(XYZ)-500*fy_D50(XYZ), 200*fy_D50(XYZ)-200*fz_D50(XYZ)) end proc:

NULL

Reference White Point for D65

NULL

X_D65wht := XYZ_D65wht[1] = .95047NULL

Y_D65wht := XYZ_D65wht[2] = 1NULL

Z_D65wht := XYZ_D65wht[3] = 1.08883 

NULL

NULL

NULL

NULL

NULL

NULL

NULL

fx_D65 := proc (XYZ) options operator, arrow; piecewise(`&epsilon;` < XYZ[1]/X_D65wht, (XYZ[1]/X_D65wht)^(1/3), XYZ[1]/X_D65wht <= `&epsilon;`, (1/116)*kappa*XYZ[1]/X_D65wht+4/29) end proc
                

NULLNULL

NULL

 
fy_D65 := proc (XYZ) options operator, arrow; piecewise(`&epsilon;` < XYZ[2]/Y_D65wht, (XYZ[2]/Y_D65wht)^(1/3), XYZ[2]/Y_D65wht <= `&epsilon;`, (1/116)*kappa*XYZ[2]/Y_D65wht+4/29) end proc
NULLNULL

NULLNULL

fz_D65 := proc (XYZ) options operator, arrow; piecewise(`&epsilon;` < XYZ[3]/Z_D65wht, (XYZ[3]/Z_D65wht)^(1/3), XYZ[3]/Z_D65wht <= `&epsilon;`, (1/116)*kappa*XYZ[3]/Z_D65wht+4/29) end proc
NULL

XYZ_to_Lab_D65 := proc (XYZ) options operator, arrow; `<,>`(116*fy_D65(XYZ)-16, 500*fx_D65(XYZ)-500*fy_D65(XYZ), 200*fy_D65(XYZ)-200*fz_D65(XYZ)) end proc:

NULL

NULL

 

NULL

C_XYZ_to_Lab := proc (XYZ, L) options operator, arrow; piecewise(evalb(L = D50), Array([`$`('[`$`('XYZ_to_Lab_D50(XYZ[m, n])', n = 1 .. N)]', m = 1 .. M)]), evalb(L = D65), Array([`$`('[`$`('XYZ_to_Lab_D65(XYZ[m, n])', n = 1 .. N)]', m = 1 .. M)])) end proc
 NULL

NULL

NULLNULL

NULL

CCLab_D50 := C_XYZ_to_Lab(CCXYZ_D50, D50): NULL

CCLab_D50 = Matrix(4, 6, {(1, 1) = Vector(3, {(1) = 37.99, (2) = 13.55, (3) = 14.06}), (1, 2) = Vector(3, {(1) = 65.71, (2) = 18.14, (3) = 17.82}), (1, 3) = Vector(3, {(1) = 49.93, (2) = -4.91, (3) = -21.92}), (1, 4) = Vector(3, {(1) = 43.14, (2) = -13.10, (3) = 21.89}), (1, 5) = Vector(3, {(1) = 55.11, (2) = 8.84, (3) = -25.39}), (1, 6) = Vector(3, {(1) = 70.72, (2) = -33.39, (3) = -.21}), (2, 1) = Vector(3, {(1) = 62.66, (2) = 36.06, (3) = 57.08}), (2, 2) = Vector(3, {(1) = 40.01, (2) = 10.42, (3) = -45.98}), (2, 3) = Vector(3, {(1) = 51.13, (2) = 48.24, (3) = 16.26}), (2, 4) = Vector(3, {(1) = 30.33, (2) = 23.00, (3) = -21.59}), (2, 5) = Vector(3, {(1) = 72.53, (2) = -23.70, (3) = 57.27}), (2, 6) = Vector(3, {(1) = 71.94, (2) = 19.37, (3) = 67.86}), (3, 1) = Vector(3, {(1) = 28.77, (2) = 14.17, (3) = -50.30}), (3, 2) = Vector(3, {(1) = 55.26, (2) = -38.32, (3) = 31.36}), (3, 3) = Vector(3, {(1) = 42.11, (2) = 53.38, (3) = 28.20}), (3, 4) = Vector(3, {(1) = 81.73, (2) = 4.03, (3) = 79.85}), (3, 5) = Vector(3, {(1) = 51.94, (2) = 50.00, (3) = -14.57}), (3, 6) = Vector(3, {(1) = 51.04, (2) = -28.65, (3) = -28.63}), (4, 1) = Vector(3, {(1) = 96.54, (2) = -.46, (3) = 1.19}), (4, 2) = Vector(3, {(1) = 81.26, (2) = -.64, (3) = -.35}), (4, 3) = Vector(3, {(1) = 66.76, (2) = -.72, (3) = -.51}), (4, 4) = Vector(3, {(1) = 50.86, (2) = -.14, (3) = -.28}), (4, 5) = Vector(3, {(1) = 35.65, (2) = -.44, (3) = -1.23}), (4, 6) = Vector(3, {(1) = 20.48, (2) = -0.7e-1, (3) = -.98})})NULL

NULL

Convert XYZ to aRGB (XYZ D50 or D65 to aRGB D65)

 

XYZ Scaling for aRGB Ymax,Ymin (Ref. Adobe RGB (1998) Color Image Encoding Section 4.3.2.2 and 4.3.8)

NULL

White Point (Luminance=160Cd/m^2) D65

Black Point (Luminance=0.5557Cd/m^2) D65

White Point (Luminance=160Cd/m^2) D50

Black Point (Luminance=0.5557Cd/m^2) D50

XW_D65 := 152.07*(1/160) = .9504375000NULL

YW_D65 := 160*(1/160) = 1``

ZW_D65 := 174.25*(1/160) = 1.089062500``

NULL

xXK_D65 := .5282*(1/160) = 0.3301250000e-2``

xYK_D65 := .5557*(1/160) = 0.3473125000e-2``

xZK_D65 := .6025*(1/160) = 0.3765625000e-2``

XK_D65 := 0:

YK_D65 := 0:

ZK_D65 := 0:

``

``

XW_D50 := .9462:NULL

YW_D50 := 1.0000:

ZW_D50 := .8249:

``

NULL

xXK_D50 := 0.33488e-2:

xYK_D50 := 0.34751e-2:

xZK_D50 := 0.28650e-2:

``

XK_D50 := 0:

YK_D50 := 0:

ZK_D50 := 0:

NULL

 

NULL

XYZD65_to_aXYZ := proc (XYZ) options operator, arrow; `<,>`((XYZ[1]-XK_D65)*XW_D65/((XW_D65-XK_D65)*YW_D65), (XYZ[2]-YK_D65)/(YW_D65-YK_D65), (XYZ[3]-ZK_D65)*ZW_D65/((ZW_D65-ZK_D65)*YW_D65)) end proc:

XYZD50_to_aXYZ := proc (XYZ) options operator, arrow; `<,>`((XYZ[1]-XK_D50)*XW_D50/((XW_D50-XK_D50)*YW_D50), (XYZ[2]-YK_D50)/(YW_D50-YK_D50), (XYZ[3]-ZK_D50)*ZW_D50/((ZW_D50-ZK_D50)*YW_D50)) end proc:

 

NULL

(ref. Adobe RGB(1998) section 4.3.6.1, Bradford Matrix includes D50 to D65 adaptation)

M_XYZtoaRGB_D50 := Matrix(3, 3, {(1, 1) = 1.96253, (1, 2) = -.61068, (1, 3) = -.34137, (2, 1) = -.97876, (2, 2) = 1.91615, (2, 3) = 0.3342e-1, (3, 1) = 0.2869e-1, (3, 2) = -.14067, (3, 3) = 1.34926})

  aXYZ_to_RGB_D50 := proc (aXYZ) options operator, arrow; `<,>`(Typesetting:-delayDotProduct(M_XYZtoaRGB_D50, aXYZ)) end proc: NULL

 

(ref. Adobe RBG(1998) section 4.3.4.1, Bradford Matrix assumes XYZ is D65)

M_XYZtoaRGB_D65 := Matrix(3, 3, {(1, 1) = 2.04159, (1, 2) = -.56501, (1, 3) = -.34473, (2, 1) = -.96924, (2, 2) = 1.87597, (2, 3) = 0.4156e-1, (3, 1) = 0.1344e-1, (3, 2) = -.11836, (3, 3) = 1.01517})

  NULL

aXYZ_to_RGB_D65 := proc (aXYZ) options operator, arrow; `<,>`(Typesetting:-delayDotProduct(M_XYZtoaRGB_D65, aXYZ)) end proc:

NULL

  aRGB Expansion for 8bits

 

`&gamma;a` := 2.19921875:

RGB_to_aRGB := proc (RGB) options operator, arrow; `<,>`(round(255*Norm(RGB[1])^(1/`&gamma;a`)), round(255*Norm(RGB[2])^(1/`&gamma;a`)), round(255*Norm(RGB[3])^(1/`&gamma;a`))) end proc:
NULL

 

Combine Steps

NULL

XYZ_to_aRGB := proc (XYZ, L) options operator, arrow; piecewise(evalb(L = D50), Array([`$`('[`$`('RGB_to_aRGB(aXYZ_to_RGB_D50(XYZD50_to_aXYZ(XYZ[m, n])))', n = 1 .. N)]', m = 1 .. M)]), evalb(L = D65), Array([`$`('[`$`('RGB_to_aRGB(aXYZ_to_RGB_D65(XYZD65_to_aXYZ(XYZ[m, n])))', n = 1 .. N)]', m = 1 .. M)])) end proc

NULLNULL

NULLNULL

Note: The aRGB values published for ColorChecker assume a black point of 0cd/m^2.

````

aRGB_D50in := XYZ_to_aRGB(CCXYZ_D50, D50):

aRGB_D50in = Matrix(4, 6, {(1, 1) = Vector(3, {(1) = 107, (2) = 82, (3) = 70}), (1, 2) = Vector(3, {(1) = 184, (2) = 146, (3) = 128}), (1, 3) = Vector(3, {(1) = 101, (2) = 122, (3) = 153}), (1, 4) = Vector(3, {(1) = 95, (2) = 107, (3) = 69}), (1, 5) = Vector(3, {(1) = 128, (2) = 127, (3) = 173}), (1, 6) = Vector(3, {(1) = 129, (2) = 188, (3) = 171}), (2, 1) = Vector(3, {(1) = 201, (2) = 123, (3) = 56}), (2, 2) = Vector(3, {(1) = 77, (2) = 92, (3) = 166}), (2, 3) = Vector(3, {(1) = 174, (2) = 83, (3) = 97}), (2, 4) = Vector(3, {(1) = 86, (2) = 61, (3) = 104}), (2, 5) = Vector(3, {(1) = 167, (2) = 188, (3) = 75}), (2, 6) = Vector(3, {(1) = 213, (2) = 160, (3) = 55}), (3, 1) = Vector(3, {(1) = 49, (2) = 65, (3) = 143}), (3, 2) = Vector(3, {(1) = 99, (2) = 148, (3) = 80}), (3, 3) = Vector(3, {(1) = 155, (2) = 52, (3) = 59}), (3, 4) = Vector(3, {(1) = 227, (2) = 197, (3) = 52}), (3, 5) = Vector(3, {(1) = 169, (2) = 85, (3) = 147}), (3, 6) = Vector(3, {(1) = 61, (2) = 135, (3) = 167}), (4, 1) = Vector(3, {(1) = 245, (2) = 245, (3) = 242}), (4, 2) = Vector(3, {(1) = 200, (2) = 201, (3) = 201}), (4, 3) = Vector(3, {(1) = 160, (2) = 161, (3) = 162}), (4, 4) = Vector(3, {(1) = 120, (2) = 120, (3) = 121}), (4, 5) = Vector(3, {(1) = 84, (2) = 85, (3) = 86}), (4, 6) = Vector(3, {(1) = 52, (2) = 53, (3) = 54})})NULL

  

NULL

aRGB_D65in := XYZ_to_aRGB(CCXYZ_D65, D65):

aRGB_D65in = Matrix(4, 6, {(1, 1) = Vector(3, {(1) = 107, (2) = 82, (3) = 70}), (1, 2) = Vector(3, {(1) = 184, (2) = 146, (3) = 128}), (1, 3) = Vector(3, {(1) = 101, (2) = 122, (3) = 153}), (1, 4) = Vector(3, {(1) = 95, (2) = 107, (3) = 69}), (1, 5) = Vector(3, {(1) = 128, (2) = 127, (3) = 173}), (1, 6) = Vector(3, {(1) = 129, (2) = 188, (3) = 171}), (2, 1) = Vector(3, {(1) = 201, (2) = 123, (3) = 56}), (2, 2) = Vector(3, {(1) = 77, (2) = 92, (3) = 166}), (2, 3) = Vector(3, {(1) = 174, (2) = 83, (3) = 97}), (2, 4) = Vector(3, {(1) = 86, (2) = 61, (3) = 104}), (2, 5) = Vector(3, {(1) = 167, (2) = 188, (3) = 75}), (2, 6) = Vector(3, {(1) = 213, (2) = 160, (3) = 55}), (3, 1) = Vector(3, {(1) = 49, (2) = 65, (3) = 143}), (3, 2) = Vector(3, {(1) = 99, (2) = 148, (3) = 80}), (3, 3) = Vector(3, {(1) = 155, (2) = 52, (3) = 59}), (3, 4) = Vector(3, {(1) = 227, (2) = 197, (3) = 52}), (3, 5) = Vector(3, {(1) = 169, (2) = 85, (3) = 147}), (3, 6) = Vector(3, {(1) = 61, (2) = 135, (3) = 167}), (4, 1) = Vector(3, {(1) = 245, (2) = 245, (3) = 242}), (4, 2) = Vector(3, {(1) = 200, (2) = 201, (3) = 201}), (4, 3) = Vector(3, {(1) = 160, (2) = 161, (3) = 162}), (4, 4) = Vector(3, {(1) = 120, (2) = 120, (3) = 121}), (4, 5) = Vector(3, {(1) = 84, (2) = 85, (3) = 86}), (4, 6) = Vector(3, {(1) = 52, (2) = 53, (3) = 54})})

Convert XYZ to ProPhoto RGB (D50)

   

NULL

CC_PPhoto := XYZ_to_PPhoto(CCXYZ_D50):

NULL

CC_PPhoto = Matrix(4, 6, {(1, 1) = Vector(3, {(1) = 81, (2) = 67, (3) = 54}), (1, 2) = Vector(3, {(1) = 159, (2) = 135, (3) = 113}), (1, 3) = Vector(3, {(1) = 94, (2) = 102, (3) = 133}), (1, 4) = Vector(3, {(1) = 75, (2) = 86, (3) = 55}), (1, 5) = Vector(3, {(1) = 118, (2) = 111, (3) = 154}), (1, 6) = Vector(3, {(1) = 127, (2) = 168, (3) = 157}), (2, 1) = Vector(3, {(1) = 167, (2) = 118, (3) = 54}), (2, 2) = Vector(3, {(1) = 79, (2) = 74, (3) = 145}), (2, 3) = Vector(3, {(1) = 141, (2) = 83, (3) = 80}), (2, 4) = Vector(3, {(1) = 68, (2) = 49, (3) = 82}), (2, 5) = Vector(3, {(1) = 144, (2) = 170, (3) = 74}), (2, 6) = Vector(3, {(1) = 181, (2) = 152, (3) = 60}), (3, 1) = Vector(3, {(1) = 57, (2) = 50, (3) = 120}), (3, 2) = Vector(3, {(1) = 85, (2) = 123, (3) = 69}), (3, 3) = Vector(3, {(1) = 120, (2) = 59, (3) = 46}), (3, 4) = Vector(3, {(1) = 199, (2) = 188, (3) = 66}), (3, 5) = Vector(3, {(1) = 143, (2) = 85, (3) = 127}), (3, 6) = Vector(3, {(1) = 78, (2) = 111, (3) = 148}), (4, 1) = Vector(3, {(1) = 242, (2) = 243, (3) = 240}), (4, 2) = Vector(3, {(1) = 189, (2) = 190, (3) = 191}), (4, 3) = Vector(3, {(1) = 145, (2) = 146, (3) = 146}), (4, 4) = Vector(3, {(1) = 102, (2) = 102, (3) = 102}), (4, 5) = Vector(3, {(1) = 66, (2) = 66, (3) = 68}), (4, 6) = Vector(3, {(1) = 37, (2) = 37, (3) = 38})})NULL

Convert XYZ to sRGB (XYZ D50 or D65 to sRGB D65)

   

NULL

Note: The sRGB values published for ColorChecker assume a black point of 0cd/m^2.

``

CCsRGB_D65in := XYZ_to_sRGB(CCXYZ_D65, D65):

NULL

CCsRGB_D65in = Matrix(4, 6, {(1, 1) = Vector(3, {(1) = 115, (2) = 81, (3) = 67}), (1, 2) = Vector(3, {(1) = 199, (2) = 147, (3) = 129}), (1, 3) = Vector(3, {(1) = 91, (2) = 122, (3) = 156}), (1, 4) = Vector(3, {(1) = 90, (2) = 108, (3) = 64}), (1, 5) = Vector(3, {(1) = 130, (2) = 128, (3) = 176}), (1, 6) = Vector(3, {(1) = 92, (2) = 190, (3) = 172}), (2, 1) = Vector(3, {(1) = 224, (2) = 124, (3) = 47}), (2, 2) = Vector(3, {(1) = 68, (2) = 91, (3) = 170}), (2, 3) = Vector(3, {(1) = 198, (2) = 82, (3) = 97}), (2, 4) = Vector(3, {(1) = 94, (2) = 58, (3) = 106}), (2, 5) = Vector(3, {(1) = 159, (2) = 189, (3) = 63}), (2, 6) = Vector(3, {(1) = 230, (2) = 162, (3) = 39}), (3, 1) = Vector(3, {(1) = 35, (2) = 63, (3) = 147}), (3, 2) = Vector(3, {(1) = 67, (2) = 149, (3) = 74}), (3, 3) = Vector(3, {(1) = 180, (2) = 49, (3) = 57}), (3, 4) = Vector(3, {(1) = 238, (2) = 198, (3) = 20}), (3, 5) = Vector(3, {(1) = 193, (2) = 84, (3) = 151}), (3, 6) = Vector(3, {(1) = 54, (2) = 136, (3) = 170}), (4, 1) = Vector(3, {(1) = 245, (2) = 245, (3) = 243}), (4, 2) = Vector(3, {(1) = 200, (2) = 202, (3) = 202}), (4, 3) = Vector(3, {(1) = 161, (2) = 163, (3) = 163}), (4, 4) = Vector(3, {(1) = 121, (2) = 121, (3) = 122}), (4, 5) = Vector(3, {(1) = 82, (2) = 84, (3) = 86}), (4, 6) = Vector(3, {(1) = 49, (2) = 49, (3) = 51})})NULL

``

CCsRGB_D50in := XYZ_to_sRGB(CCXYZ_D50, D50):

``

CCsRGB_D50in = Matrix(4, 6, {(1, 1) = Vector(3, {(1) = 115, (2) = 81, (3) = 67}), (1, 2) = Vector(3, {(1) = 199, (2) = 148, (3) = 129}), (1, 3) = Vector(3, {(1) = 91, (2) = 123, (3) = 156}), (1, 4) = Vector(3, {(1) = 90, (2) = 108, (3) = 64}), (1, 5) = Vector(3, {(1) = 130, (2) = 129, (3) = 176}), (1, 6) = Vector(3, {(1) = 92, (2) = 190, (3) = 172}), (2, 1) = Vector(3, {(1) = 224, (2) = 125, (3) = 47}), (2, 2) = Vector(3, {(1) = 68, (2) = 92, (3) = 170}), (2, 3) = Vector(3, {(1) = 198, (2) = 83, (3) = 97}), (2, 4) = Vector(3, {(1) = 94, (2) = 59, (3) = 106}), (2, 5) = Vector(3, {(1) = 159, (2) = 190, (3) = 63}), (2, 6) = Vector(3, {(1) = 230, (2) = 163, (3) = 39}), (3, 1) = Vector(3, {(1) = 35, (2) = 64, (3) = 147}), (3, 2) = Vector(3, {(1) = 67, (2) = 149, (3) = 74}), (3, 3) = Vector(3, {(1) = 180, (2) = 51, (3) = 57}), (3, 4) = Vector(3, {(1) = 238, (2) = 199, (3) = 20}), (3, 5) = Vector(3, {(1) = 193, (2) = 85, (3) = 151}), (3, 6) = Vector(3, {(1) = 54, (2) = 137, (3) = 170}), (4, 1) = Vector(3, {(1) = 245, (2) = 246, (3) = 243}), (4, 2) = Vector(3, {(1) = 200, (2) = 203, (3) = 202}), (4, 3) = Vector(3, {(1) = 161, (2) = 164, (3) = 163}), (4, 4) = Vector(3, {(1) = 121, (2) = 122, (3) = 122}), (4, 5) = Vector(3, {(1) = 82, (2) = 84, (3) = 86}), (4, 6) = Vector(3, {(1) = 49, (2) = 50, (3) = 51})})``

NULL

``

NULL

NULL

``

 

 

 

 

 

 

 

 

``

 

Corrections to the original version of theis document;
• Make the scaling for a nonzero black point the same for all RGB color spaces.
• Clip negative RGB values to zero.
• Remove the redundant Array container from matrix multiplications.
Use map in place of the $ to apply a function to each element of an Array.

Pixel_Conversion_B.mw

 

The Interactive Embedded Components in Physics are of great importance today and will be even more in the future. Hereand leave a small tutorial of Embedded Components in Physics applied to physics. I hope that somehow you motives to continue the development of science.

 

  Interactive_Embedded_Components_in_Physics.mw      (in spanish)                 

 Ponencia_CRF.pdf

Atte.

Lenin Araujo Castillo

Physics Pure

Computer Science

 

Following @acer 's challenge to create some more examples for the Rosetta Code project, I've put together some code that constructs Stem-And-Leaf plots here.

I've also attached a new mathapp ( StemAndLeafDisplay.mw ) that contains the code as well as an interactive example for Stem-Plots. This MathApp is also viewable online on the MapleCloud here.

This older post may also be of interest for anyone looking to make a stem and leaf plot with decimals.

First 42 43 44 45 46 47 48 Last Page 44 of 71