ChristopherChudzicki / math3d-react

A user-friendly 3d graphing calculator for the web. Create, share, and animate 3d mathematical scenes.
https://www.math3d.org
Mozilla Public License 2.0
245 stars 34 forks source link

How can I get more control over the colors? #338

Open airbete opened 2 years ago

airbete commented 2 years ago

How can I get more control over a surface color?

  1. There are 10 predefined colors. How can I choose another specific color (e.g. #aa0050) ?
  2. There are 3 predefined gradients to be used with the color map function. Is there anyway to use my own linear gradient from color A to color B ?
  3. The shaded option renders all surfaces way too dark, no matter what color I choose. How can I get a brighter rendering? Is there any way to choose the position of the light?

Thank you,

AB

ChristopherChudzicki commented 2 years ago

Good questions!

Somewhat disappointing answers:

  1. At the moment, you can't. The default blue is also a different shade than the blue available in color picker, which has always kind of annoyed me.
  2. Not at the moment
  3. You can't change the direction of the light, though you might get some mileage from decreasing the surface opacity.

All of these would be good features, IMO. I'm focusing my limited free time on a (backwards-compatible) rewrite of math3d, so I may not take up any of these soon.

That said, I would welcome contributions, especially around issue (1). I think that (1) would be a fairly straightforward feature to implement in the existing app, and is something I will definitely include in the rewrite. (hence "Help Wanted".)

ChristopherChudzicki commented 1 year ago

I just want to mention that this is functional in https://github.com/ChristopherChudzicki/math3d-next (though the overall project is still very much a work in progress). Here's the new color selection form:

Screen Shot 2022-10-11 at 8 00 58 AM