Author Topic: Angle Gradient for DIY Encoder  (Read 725 times)

0 Members and 1 Guest are viewing this topic.

Offline eTobeyTopic starter

  • Super Contributor
  • ***
  • Posts: 1187
  • Country: de
  • Virtual Features for the SDS800XHD -> My website
    • Virtual feature script
Angle Gradient for DIY Encoder
« on: February 26, 2023, 01:55:55 pm »
Hi,

i would like to build an encoder, but i cant generate an useful printing pattern for it.

I tried Photoshop, but it limits steps to only 1%. Also i tried using CSS (HTML), but this yields not exact gradients.

I can not use an encoder, that uses a disc and puts light through it, i need to use reflection. On that one picture with the thin green lines, you can see the ring, where the print should go.

See also:
https://botscene.net/2012/10/18/make-a-low-cost-absolute-encoder/

« Last Edit: February 26, 2023, 02:07:47 pm by eTobey »
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant."(Maxim Gorki)

SDS800X HD issues/tips/workarounds
 

Offline eTobeyTopic starter

  • Super Contributor
  • ***
  • Posts: 1187
  • Country: de
  • Virtual Features for the SDS800XHD -> My website
    • Virtual feature script
Re: Angle Gradient for DIY Encoder
« Reply #1 on: February 26, 2023, 07:01:54 pm »
Figured it out by myself:

One lucky google find,  a few hours and some tweaking: The solution is gnuplot...

Code: [Select]
set pm3d map
unset key

# plot the heatmap
set parametric
set isosamples 5000

unset border
unset xtics
unset ytics
unset colorbox

set angles degree
r = 6
set urange[0:r] # radius
set vrange[0:360] # angle
set xrange[-r:r]
set yrange[-r:r]
set size ratio 1
set palette gray
set terminal gif size 3000,3000
set output 'output9.gif'

splot u*cos(v), u*sin(v), sin(v*21)
« Last Edit: February 26, 2023, 07:03:44 pm by eTobey »
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant."(Maxim Gorki)

SDS800X HD issues/tips/workarounds
 
The following users thanked this post: thm_w

Online eliocor

  • Supporter
  • ****
  • Posts: 531
  • Country: it
    • rhodiatoce
Re: Angle Gradient for DIY Encoder
« Reply #2 on: February 26, 2023, 08:10:18 pm »
maybe you can use HTML...
Here is an example (15 degrees/step):
Open file with a browser (remove '.txt' extension)

Code: [Select]
<!DOCTYPE html>
<html>
<head>
<style>
#grad1 {
  height: 1000px;
  width: 1000px;
  background-color: red; /* For browsers that do not support gradients */
  background-image: conic-gradient(
  black   0deg, white  15deg, black  30deg, white  45deg, black  60deg, white  75deg,
  black  90deg, white 105deg, black 120deg, white 135deg, black 150deg, white 165deg,
  black 180deg, white 195deg, black 210deg, white 225deg, black 240deg, white 255deg,
  black 270deg, white 285deg, black 300deg, white 315deg, black 330deg, white 345deg,
  black 360deg
  );
}
</style>
</head>
<body>

<h1>Conic Gradient - 15 degrees for each color</h1>

<div id="grad1"></div>

</body>
</html>
 

Offline eTobeyTopic starter

  • Super Contributor
  • ***
  • Posts: 1187
  • Country: de
  • Virtual Features for the SDS800XHD -> My website
    • Virtual feature script
Re: Angle Gradient for DIY Encoder
« Reply #3 on: February 28, 2023, 07:42:21 am »
I already wrote, that i used CSS. It is not relialable.
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant."(Maxim Gorki)

SDS800X HD issues/tips/workarounds
 

Online eliocor

  • Supporter
  • ****
  • Posts: 531
  • Country: it
    • rhodiatoce
Re: Angle Gradient for DIY Encoder
« Reply #4 on: February 28, 2023, 08:42:16 am »
just by curiosity:
what kind of printer technology do you use to appreciate the difference?
 

Offline eTobeyTopic starter

  • Super Contributor
  • ***
  • Posts: 1187
  • Country: de
  • Virtual Features for the SDS800XHD -> My website
    • Virtual feature script
Re: Angle Gradient for DIY Encoder
« Reply #5 on: February 28, 2023, 05:21:05 pm »
I just tried printing those today. My printer is really not useable for this. Lines when printing with black ink... No lines with mixing the other colors to black, but this has itself some issues.

I think i should go straight to some fancy plasma deposition technique...

"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant."(Maxim Gorki)

SDS800X HD issues/tips/workarounds
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf